Jump to content


Photo
- - - - -

Edit category.php file in order to create a glossary


Best Answer Simon_P , 10 June 2013 - 04:39 PM

Further down the page you would have found the answer...

 
function foo_modify_query_order( $query ) {
if ( $query->is_category() && $query->is_main_query() ) {
$query->set( 'orderby', 'title' );
$query->set( 'order', 'ASC' );
}
}
add_action( 'pre_get_posts', 'foo_modify_query_order' );
Go to the full post


  • Please log in to reply
1 reply to this topic

#1 Jean-Philippe

Jean-Philippe

    Super Member

  • Members

  • 116 posts
  • LocationTokyo
  • Country: Country Flag

Posted 10 June 2013 - 03:50 PM

Hi,

 

In order to create a glossary, I would like to display posts alphabetically within a specific category template.

As described 

Please Login or Register to see this Hidden Content

, I need to insert this piece of code:

Please Login or Register to see this Hidden Content

My problem is I can't find the category-XX.php file I need to modify into wp-content > themes > pagelines folder.

I know I must not modify PageLines core files so I currently use a child theme (wp-content > themes > pagelines-template-theme) but I can't neither find any category.php file into it.

 

Any help please?



#2 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 10 June 2013 - 04:39 PM   Best Answer

Further down the page you would have found the answer...

Please Login or Register to see this Hidden Content


  • Jean-Philippe likes this