Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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
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,682 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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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 04:27 AM.


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