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 »

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


  #1  
Old Sep 3, 2013, 01: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, 01:47 PM
juggledad's Avatar
juggledad
 
23,765 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



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 04:38 AM
Category Description On FIRST Archive Page msj484 Center area post/pages 10 Nov 16, 2011 03:28 PM
[SOLVED] Remove Category Description As Category Hyperlink Title msj484 Page & Category Menu Bars 7 Sep 18, 2011 03:53 PM


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


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