Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

php in single post


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Feb 10, 2009, 08:40 AM
Haser
 
9 posts · Feb 2009
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
  #2  
Old Feb 10, 2009, 12:16 PM
Flynn's Avatar
Flynn
 
3,745 posts · Oct 2008
Munich, Germany
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)
  #3  
Old Jan 29, 2010, 10:05 AM
Chloe
 
42 posts · Dec 2009
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
  #4  
Old Dec 4, 2012, 07:54 PM
genuwine4532
 
37 posts · Sep 2010
Thank you Flynn,

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

Bookmarks

Tags
single post php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why no single.php DavePorter Plugins & Atahualpa 5 Apr 23, 2010 06:45 PM
[SOLVED] Next post and previous post links on top of single post page error susieswe Atahualpa 3 Wordpress theme 2 Jul 15, 2009 02:58 PM
Banner over Single Post Title jay2009 Header configuration & styling 0 Mar 21, 2009 04:41 PM
How do i EDIT Single Post? sns Atahualpa 3 Wordpress theme 2 Mar 9, 2009 10:25 AM
Problem with Archives Returning a Single Post andyro Atahualpa 3 Wordpress theme 1 Dec 12, 2008 03:54 PM


All times are GMT -6. The time now is 11:45 PM.


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