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 »

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


  #1  
Old Sep 3, 2013, 12:04 PM
escteban
 
2 posts · Sep 2013
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.
  #2  
Old Sep 3, 2013, 12:47 PM
juggledad's Avatar
juggledad
 
23,632 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Category & Category Description Of Empty Category msj484 Atahualpa 3 Wordpress theme 3 Apr 30, 2012 03:38 AM
Category Description On FIRST Archive Page msj484 Center area post/pages 10 Nov 16, 2011 02:28 PM
[SOLVED] Remove Category Description As Category Hyperlink Title msj484 Page & Category Menu Bars 7 Sep 18, 2011 02:53 PM


All times are GMT -6. The time now is 03:43 PM.


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