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 » Montezuma Theme »

Adding a php code in the theme?


  #1  
Old Aug 30, 2013, 05:01 PM
blogmaster2003
 
4 posts · Dec 2008
Adding a php code in the theme?

Hi

i read many threads so i tried doing this:

i have one subtemplate called ads.php
there i have this (only for tests)
<?php
echo "Hello World";
?>

then as i want it to appear in every post after the pagination i have this at single.php in main templates section:

PHP Code:
        <?php comments_template''true ); ?>

        <nav class="singlenav cf">
            <div class="older"><?php previous_post_link(); ?></div>
            <div class="newer"><?php next_post_link(); ?></div>
        </nav>
        
          <div>

            <?php bfa_get_template_part'ads' ); ?>
        </div>
    </div>
    
    <div id="widgetarea-one" class="col4">
        <?php dynamic_sidebar'Widget Area ONE' ); ?>
       

    </div>
But im not seeing the hello world at any post,

can someone help me?

I just need to add some php code to render in posts or if simpler in all site.

Thank you

PS: i tried to include an outside php file but i had the same result
  #2  
Old Aug 30, 2013, 06:49 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
1) you can't add just any php into a virtual template - click the 'Limited PHP Code' tab at the top right of the screen
2) use the format
HTML Code:
<?php bfa_get_template_part( 'ads', '' ); ?>

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding php code in footer _kimberley Header configuration & styling 7 Dec 19, 2011 03:52 AM
Adding code for ads or other sites (newbie when it comes to code issues!) gardentravelbuzz Plugins & Atahualpa 7 Feb 7, 2011 04:43 AM
Adding some code Steve_T Atahualpa 3 Wordpress theme 9 Feb 7, 2009 04:28 PM


All times are GMT -6. The time now is 09:54 PM.


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