Quote of the Day
Quote of the Day
I'm trying to add a quote of the day in the footer section but can't figure out where to add the code. I have a php script in the root directory of flatpress along with a text file containing the quotes. It works by using the <?php include"file.php" ?> command and works fine. Just can't figure out where/how to add the include command. I tried using the footer box in the options, but evidently it does not accept php code. Can anyone help?
Re: Quote of the Day
Sure.
head to your fp-interface/themes directory, and enter the directory of the theme your blog currently uses (for example, leggero).
Then, simply open up your footer.tpl file in your editor of choice. Then place the code where you wish for it to be seen in your footer.
Flatpress can have issues with raw PHP code due to Smarty conflicts, so make sure to wrap your "<?php include"file.php" ?>" in {literal} {/literal} tags.
head to your fp-interface/themes directory, and enter the directory of the theme your blog currently uses (for example, leggero).
Then, simply open up your footer.tpl file in your editor of choice. Then place the code where you wish for it to be seen in your footer.
Flatpress can have issues with raw PHP code due to Smarty conflicts, so make sure to wrap your "<?php include"file.php" ?>" in {literal} {/literal} tags.
Re: Quote of the Day
Thanks for your reply Tongara. What worked is the following:
{php}
include('path/to/file/file.php');
{/php}
I'm a happy camper.
{php}
include('path/to/file/file.php');
{/php}
I'm a happy camper.
Re: Quote of the Day
It's just another workaround to the issue, but yes. Glad to see you got it working.
Keep those "literal" tags in mind, though. They helped me out on many occasions where they shouldn't have needed to.
Keep those "literal" tags in mind, though. They helped me out on many occasions where they shouldn't have needed to.
Who is online
Users browsing this forum: No registered users and 76 guests