Jump to content

Include php header in tpl


FPForum

Recommended Posts

I am trying to include the php header from my wordpress in order to replace the header on whmcs. I have removed the whmcs header and background but it doesn't seam to be displaying my wordpress header.php....am I missing something? Can I include php in the tpl file?

Link to comment
Share on other sites

Are you able to tell me where the 2 sites (WHMCS and Wordpress) are located?

 

The ../ at the front is just what mine has (the head.php is located one directory above my WHMCS)

 

Sounds like it can't find the file, so it spits out a blank page which is normal for the WHMCS system.

Link to comment
Share on other sites

Are you able to tell me where the 2 sites (WHMCS and Wordpress) are located?

 

The ../ at the front is just what mine has (the head.php is located one directory above my WHMCS)

 

Sounds like it can't find the file, so it spits out a blank page which is normal for the WHMCS system.

 

Certainly robbo.

public_html/wp-content/themes/hosting/header.php --is where my header is located

public_html/clients/templates/portal/header.tpl --is the header for my whmcs

 

I'm also noticing, my wordpress displays just fine on my index page, but when trying to access the header this way: Here I am noticing I get an error..Would this make any difference? The header displays absolutely fine on my site, so I wouldn't think it would make a difference..

 

Thanks for your help robbo!

Link to comment
Share on other sites

It looks like that could be causing the error.

Possibly try, {php}include ('/home/user/public_html/wp-content/themes/hosting/header.php');{/php}

 

Replace /home/user with your full address. This will rule out it not finding the file. If it doesn't work, you might just have to copy the source code and paste into the header.tpl

 

Good luck.

Link to comment
Share on other sites

Yes you would, as there will be certain styles in the main page which aren't in the WHMCS template styles.

 

Thanks bud, still didn't work so i'm not exactly sure what I am gonna do. the furthest i've gotten was the original way, which gave me a white screen and all that shows up is the code upto the first bloginfo which is:

<meta http-equiv="Content-Type" content="

 

I am thinking it must be because of the error I am getting in my header.php..It's really weird that the error shows up even though the header displays perfectly fine on my main page..

Link to comment
Share on other sites

  • 1 year later...

Not a coder, just an idea from my own design troubles...

 

Copy the contents of your header file into another file local to your WHMCS directory, change the include calls in the new file you created, and use {literal} {/literal} tags at the start and end of that file?

Link to comment
Share on other sites

  • 3 years later...

 

@mycommon No, Literal tags are used for java script.

 

Literal tags are used for anything you want to escape from normal smarty markup. Specifically { and } characters. If you anticipate having any of them in normal text or code, you either need to wrap {literal} tags around it, or replace them with {ldelim} and {rdelim}

 

Its not only for javascript, but thats commonly where you will see it.

Link to comment
Share on other sites

  • 5 months later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated