Where to paste php code in WordPress...

by 4 replies
5
Hey Everyone!

I did a few searches before posting and couldn't find an answer to my question. If this is a repeat, I apologize.

I'm running WordPress hosted on Hostgator. I have DLGuard installed successfully on the server.

When I get the code that I'm supposed to past into the page to create the sign-up form, I don't know WHERE to post it. The Hostgator tech explained to me about how WP uses "virtual" pages that aren't real .php pages.

I've tried pasting the code in HTML view, between the [code] tags and have played a bit with a "run php" WP plugin but got confused. I also used File Manager in CPanel to try and find the "physical" page to try and edit the code, but wasn't able to.

I have SOME technical understanding, but I'm stuck and in a little over my head!

Thanks a lot!

Adam
#programming #code #paste #php #wordpress
  • I will try to answer your question, I want to see if I have it right,
    1. you are using Dlguard, on hostgator,
    2. you want to protect a page using dlguard
    3. you want to protect a wordpress (page) or (post) using DL guard.
    If this is correct you will need to (create) a page on your wordpress website, then use a template, near the top, but after the wordpress template, (required PHP code) you would paste you dlguard PHP,

    I can look up the required, code, and post it back if you like but you will need to use html, and PHP together, if that makes sense, or perhaps here is a better way to say that,

    Use PHP to notify wordpress, (that you are using a special template)
    or custom template, then you use the PHP to do membership check using DLguard, then you use html and or PHP to pull in a webpage design to brand your custom page,

    let me know if that works for you, Tim

  • [DELETED]
    • [1] reply
    • @Tim - Hey, Tim, yes you have what I want to do (1-3) correct. I kinda sorta understand the rest of what you said, but it's a little past me The thing is, I can't imagine DLGuard requires any hand coding to integrate with WP. There HAS to be something missing here.

      Can you expand on this part? "then use a template, near the top, but after the wordpress template"

      @somacorellc - Yeah, you'd THINK that's what you would do. It DOESN'T WORK though!

      Thanks again, guys!

      Adam
      • [1] reply
  • [DELETED]
    • [1] reply
    • These are the instructions:




      And this is the code:

      <?php
      $pathToCBDM = "../dlg/";
      $cbdmProduct = 1;
      include ($pathToCBDM."cbdm.php");
      ?>

      (BTW, If I posted something secure up there please let me know so I can scub it :confused

      I have a post on the DLGuard Board as well. No response yet!

      Adam
  • [DELETED]

Next Topics on Trending Feed