• Resolved benjamincano

    (@benjamincano)


    I know there are a lot of post about the “sort by custom field” subject, but apparently i cant make any to work on the category.php page, because it either breaks the pagination or will not make the page itself work as it should.

    I just want to sort the fields as priority or not and then by title, please any ideas are welcome.

Viewing 2 replies - 1 through 2 (of 2 total)
  • So what is “priority”? That’s not a field in the database…or is that a custom field?

    Thread Starter benjamincano

    (@benjamincano)

    I was using a custom field, what I did was built 2 queries.

    This displays the priority ‘1’

    <?php  query_posts($query_string . '&orderby=title&order=ASC&meta_key=patrocinado&meta_value=1&posts_per_page=10' );
    if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    This displays the rest ‘0’

    <?php query_posts($query_string . '&orderby=title&order=ASC&meta_key=patrocinado&meta_compare=!=&meta_value=1&posts_per_page=10' );
    if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    While I know this is not the “ultimate” solution it works for me due to pagination issues and so my priority wont paginate.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Category page sort order’ is closed to new replies.