Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

php in single post


  #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,768 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
 
54 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 06:26 AM.


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