WordPress.org

Ready to get started?Download WordPress

Forums

My Post Order
[resolved] Post Order on Subpages (4 posts)

  1. BenWilkinson
    Member
    Posted 1 year ago #

    Hey mate,

    I'm working on a site that offers courses that need to be listed in a particular order of 'value'. Your plugin works great on the main courses page, and I was able to manually sort the list to what I needed using:

    $postslist = get_posts('numberposts=100&section_name=courses');

    However when I go to a subpage, and use that exact same code it has no affect.

    Courses page URL:
    homepage/courses

    Subpage URL:
    homepage/locations/particular_franchise/courses

    Is this limited in site hierarchy or am I making a local mistake?

    Cheers.

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

  2. BenWilkinson
    Member
    Posted 1 year ago #

    Nevermind!

    I was using this in the top page:

    $postslist = query_posts('numberposts=100&section_name=courses');

    as opposed to this in the subpage:

    $postslist = get_posts('numberposts=100&section_name=courses');

    Coding 101 error, my bad. Other than that it works a charm and I've put it in our standards to use for other client work. Cheers.

  3. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Great!! :)

  4. Kapil Chugh
    Member
    Plugin Author

    Posted 1 year ago #

    Forgot to mark this topic as resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic