Support » Plugin: Featured Page Widget » [Plugin: Featured Page Widget] Changing the order of pages

Viewing 1 replies (of 1 total)
  • adam.harvie

    (@adamharvie)

    I was able to change the order successfully, in featured-page-widget.php, starting at line 317:

    /* Get the list of pages */
              if ( $instance['category'] != -1 ) {
                   $pages = array_flip($this->options->post_types);
                   unset($pages['page']);
                   $this->options->post_types = array_flip($pages);
                   $args = array(
                        'category__in' => $instance['category'],
                        //'post__not_in' => array($post->ID),
                        'posts_per_page' => $instance['items'],
                        'order' => 'ASC',
                        'orderby' => 'menu_order',
                        'post_type' => $this->options->post_types,
                        'ignore_sticky_posts' => true,
                   );
              } else {
                   $args = array(
                        'post__in' => $instance['page'],
                        'posts_per_page' => $instance['items'],
                        'order' => 'ASC',
                        'orderby' => 'menu_order',
                        'post_type' => $this->options->post_types,
                        'ignore_sticky_posts' => true,
                   );
              }

    I’m using menu_order instead of title.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Featured Page Widget] Changing the order of pages’ is closed to new replies.