Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   php in single post (http://forum.bytesforall.com/showthread.php?t=307)

Haser Feb 10, 2009 08:40 AM

php in single post
 
hi, how to insert a string php like Related Posts, inside the single post between footer and comments?

I do not want it to appear in the page.

thanks

Flynn Feb 10, 2009 12:16 PM

To put it above the comments, and only on single post pages, put it into index.php at around line 217 right before this:

PHP Code:

        <?php // Load Comments template (on single post pages, and "Page" pages, if set on options page)

... and wrapped into a conditional statement, so that you end up with:

PHP Code:

<?php if ( is_single() ) { ?>
<?php YOUR PHP CODE HERE ?>
<?php 
?>
        <?php // Load Comments template (on single post pages, and "Page" pages, if set on options page)


Chloe Jan 29, 2010 10:05 AM

Hi Flynn,

I need to insert code in this part of the loop:

<?php bfa_post_bodycopy('<div class="post-bodycopy clearfix">','</div>'); ?>

I want to insert this code:

<?php if ( is_single() ) { ?>
<script type="text/javascript">show_banners('page_ad');</script>
<?php } ?>

What I'm trying to do is get my ads to appear in the same spot in all posts. I keep coming up with syntax errors because I don't know much PHP. Is this doable?

Thanks

genuwine4532 Dec 4, 2012 07:54 PM

Thank you Flynn,

I have been searching for this answer for hours!!!


All times are GMT -6. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.