Jump to content


This topic is now archived and is closed to further replies.


Anyway to add php include?

Recommended Posts


Website URL: boneyard.teddyaddiction.com/kruss


Framework Version: DMS 1.1.1

WordPress Version: 4.1.1

Plugins in Use: Custom Sidebars, Post Duplicator

Server/Host: Linux somethingOrOther/ASmallOrange



Ok, this is driving me up the wall. Ready to start breaking stuff :)


I can't seem to add a php include to grab a piece of code. I have a formatted email subscription box that I want to call from within a page. I've been trying and trying for hours now and can't get anything to work.


Here's my code. It's in a textbox section:

<div class="signupBox"><h5>Hungry for more?</h5>
More articles, coming right up. Punch in your email below and we'll let you know as soon as they're ready to devour.
<?php get_template_part( 'emailBox ' ); ?>
<?php include ( 'emailBox.php' ); ?>
<?php include 'emailBox.php'; ?>
<?php include ($_SERVER['DOCUMENT_ROOT'].'/emailBox.php'); ?>

The text looks great, the php stuff doesn't work. None of them.


I can't see any errors, and it looks like Pagelines adds comment tags around the php when it's rendered! Yikes!


When I view the page source they all look like this:

<!--?php get_template_part( 'emailBox ' ); ?-->

Really frustrating.


Everything was going along swimmingly and now I'm growing gray hairs faster than your grandma.


Any idea how I can add a simple php include?




Share this post

Link to post
Share on other sites



You can not include PHP in WordPress or DMS like that. You will want to use a hook, see here for more information - http://answers.pagelines.com/Customization/how-to-use-hooks


You could try creating your own section to include your PHP that way.

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

  • Similar Content

    • KathleenAspenns
      By KathleenAspenns+
      I would like to upgrade my site to PHP 7, but there is an error warning in the PL Framework theme. I should think this should be fixed asap, I cannot be the only person trying to be up to date.
      1976 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
    • Dan Haddock
      By Dan Haddock
      DMS: Latest Version
      Running a Child Theme
      Wordpress: 4.8.3
      Akismet Anti-Spam 
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools    
      Enhanced Media Library
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap    
      Jetpack by WordPress.com
      MailChimp for WordPress
      PageLines Updater
      Really Simple SSL
      Schema App Structured Data
      Sucuri Security - Auditing, Malware Scanner and Hardening  
      Uber reCaptcha
      Yoast SEO
      Problem Below
      Hi Team,
      I am looking to style the Continue Reading Button with the PHP you provided in an earlier ticket here: 
      I put the PHP code into my site, however I do not get my Icon back, I just get back Read More >>
      I have attached a screenshot of the code in place on my site along with the output.
      Interested to know what I may be doing wrong? - I am very new to PHP so a bit apprehensive on this.
      The Images: https://drive.google.com/open?id=0B0i4JJXa2jdQN2xoakZNRUdmaU0
      Let me know if you need any more information from me.
    • casseysdesigns
      By casseysdesigns+
      In the past I would use nextbox for this task. However, Platform 5 does not have nextbox. I will do my best to describe what I am trying to do.
      I am creating a template for coaches, each product has its own link but they all share a common coach id. I want to set up the templates with the links for each product with a variable for the coach id so that I can change the coach id for all the links on the site by just changing the value of the variable $coachId. To do this I'll need to do something like the following...
      <a href="salesite.com/productcodes/referringRepId=<?= $coachId ?>" target="_blank">Product Purchase Link</a> Is it possible to do this with Platform 5?
    • Barnaby Skinner
      By Barnaby Skinner+
      Hey team,
      Really simple question: where would I add code to a specific page header? I can see in the settings I can add code to the global header, but can't see how to do it for a single specific page. It's related to facebook pixel tracking
    • dymond
      By dymond+
      Ahhh I screwed up. I was ALMOST DONE with my website, and tried adding a mailchimp js pop up form on the home page with this code mailchimp gave me for the pop up:
      <script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us12.list-manage.com","uuid":"d136d5c71f4509140650ecf70","lid":"ab22ff149a"}) })</script>
      However, instead of adding a pop up it applied to the entire home page so now when I go to page to delet the code, I can;t... I get the stupid pop up and all i see is ablank page... please can someone out there help? Thank you! i have no idea where to manually find the code so I can delete it. I added a PL5 section "html" and dropped it in there...