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)
-   -   How to display category description on top of a category page ? (http://forum.bytesforall.com/showthread.php?t=20864)

escteban Sep 3, 2013 12:04 PM

How to display category description on top of a category page ?
 
Hello,

I am trying to display the category description on top of category page. So I have added that to index.php in /montezuma/admin/main-templates/index.php as I think the category page is loaded from the index.php.

Code:

    <?php
        print "test";
    if( is_category() ) {
        echo category_description( $category_id );
    }
        ?>

Nothing happen, even the text "test" is not displayed.
If anyone can help, he/she is welcome.
Thanks.

juggledad Sep 3, 2013 12:47 PM

1) create a new MAIN virtual template called 'category' and copy index.php to it
2) you are limited to the php you can use - check the 'Limited PHP Code' tab at the upper right
- you can add widget areas to a template and use a widget like 'exec php' to get arround this. (this is due to the WordPress Theme restriction that prohibit the use of the 'eval()' function in themes, yet you can use it in plugins - go figure)
3- to see that your new template is being used, just add somethig like 'this is the category template' at the very top.


All times are GMT -6. The time now is 01:38 PM.

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