Simple Page Ordering
[resolved] Not working on Front End (3 posts)

  1. Abhimanyu Singhal
    Posted 2 years ago #

    I have added the orderby argument as shown in the full code registering my custom post type, below..

    $args = array(
    		'labels' => $labels,
    		'public' => true,
    		'exclude_from_search' => true,
    		'publicly_queryable' => true,
    		'show_ui' => true,
    		'query_var' => true,
    		'capability_type' => 'post',
    		'hierarchical' => true,
    		'orderby' => 'menu_order',
    		'order' => 'ASC',
    		'menu_position' => null,
    		'supports' => array('title','editor','thumbnail','custom-fields','excerpt','comments', 'page-attributes')
    	  register_post_type(__( 'portfolio' ),$args);

    The plugin works great in the backend but in vain for the front end. Any help would be appreciated. ^_^



  2. Austen Blokker
    Posted 2 years ago #

    You've got the completely wrong arguments going into register_post_type(). Orderby and order don't belong here. They are meant to be used when you are querying posts from the frontend, in WP_Query()

  3. Abhimanyu Singhal
    Posted 2 years ago #

    Solved. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Page Ordering
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic