Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Adding a php code in the theme? (http://forum.bytesforall.com/showthread.php?t=20848)

blogmaster2003 Aug 30, 2013 05:01 PM

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

juggledad Aug 30, 2013 06:49 PM

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', '' ); ?>


All times are GMT -6. The time now is 10:11 AM.

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