Support » Plugin: My Post Order » Can't get it to work on posts Page

  • Resolved Okoth1

    (@okoth1)


    Hi,

    I have a Page with several posts on it that I want to order.
    This is the start of the loop.

    <?php while(have_posts()) : the_post();
    $myposts = get_posts('category_name="produk" &order=ASC');
    foreach($myposts as $post) :
    setup_postdata($post);
    ?>

    I’ve tried with the query_posts(‘section_name=productsorder’) at the top, but I couldn’t get it to work

    Thanks

    http://wordpress.org/extend/plugins/my-posts-order/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kapil Chugh

    (@kapilchugh)

    What is the URL?

    Try to deactivate other post order related plugins.

    Still on XAMPP.

    I don’t have other order related plugins.

    When I remove &order=ASC from the code above also no effect.

    To be clear, it’s not a Archive Page but a regular Page with posts on it.

    Fixed it.

    $productorder = array(
       'meta_key' => 'produkorder',
       'orderby' => 'meta_value_num',
       'order' => 'ASC',
       'meta_query' => array(
           array(
               'key' => 'produkorder',
               'value' => array(1, 2, 3, 4),
               'compare' => 'IN',
           )
       )
     );

    Which also mean that I don’t need to use your plugin anymore…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can't get it to work on posts Page’ is closed to new replies.