WordPress.org

Ready to get started?Download WordPress

Forums

My Post Order
Plugin shows all posts instead of just the section content (9 posts)

  1. globeriding
    Member
    Posted 1 year ago #

    Hello,

    I use the plugin in my wordpress but not in a widget.
    I've created a section "nosservices" wich contains all posts of the category "Nos services" (identity : nosservices).
    The widget works but not my code :

    <?php $recent = new WP_Query('section_name=nosservices'); while($recent->have_posts()) : $recent->the_post();?>
    <li>
     <a href="javascript:;">
     <h2><?php the_title(); ?></h2>
     </a>
    </li>
    <?php endwhile; ?>

    Can I have some help please?
    Thanks by advance

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

  2. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    What is the o/p?

  3. globeriding
    Member
    Posted 1 year ago #

    sorry it's in the subject.

    the "wp_query" gets all my posts instead of just those which are in the section I've created with your plugin.

    my website : http://www.linstantprecieux.net/
    part lower right : "Nos services"

    configuration : http://imageshack.us/photo/my-images/687/instantprcieuxwordpress.jpg/

  4. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, my mistake.

    Try to change the criteria in the admin panel(i.e select 'select posts individually' and change order and then check)

    Also make sure you don't have any other 'post order' related plugin activated and your section name is same as you have mentioned in admin panel.

  5. globeriding
    Member
    Posted 1 year ago #

    I've tried : http://imageshack.us/photo/my-images/850/mypostsorderoptions2.jpg/

    but still have all posts...

    I've changed to use array, but no changes

    <?php $recent = new WP_Query(array('section_name'=>'nosservices')); while($recent->have_posts()) : $recent->the_post();?>
                        <li>
                            <a href="javascript:;">
                                <h2><?php the_title(); ?></h2>
                            </a>
                        </li>
                    <?php endwhile; ?>

    And no I don't have any other 'post order'

  6. globeriding
    Member
    Posted 1 year ago #

    In fact, anything I put in the section name, I get always all posts.

    <?php $recent = new WP_Query(array('section_name'=>'XXXXXXX')

  7. mgilberties
    Member
    Posted 11 months ago #

    Having exactly the same issue.
    Is there an alternative like section_id?

  8. stalyun38
    Member
    Posted 6 months ago #

    same issue can't get it to return only section content i've selected. running WP 3.7.1 and the latest MPO Any ideas why it returns all posts instead of section content?

  9. esmi
    Forum Moderator
    Posted 6 months ago #

    @stalyun38: If you require assistance then, as per the Forum Welcome, please post your own topic. This topic references an old version of WordPress.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.