• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Author Pro theme – library post order

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Author Pro theme – library post order

This topic is: resolved
  • This topic has 6 replies, 2 voices, and was last updated 7 years, 8 months ago by renwil.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • July 19, 2015 at 8:29 pm #159845
    renwil
    Participant

    I am working on a site for a client who has written over 100 books in several different series. Is there a simple way to put the posts in the order that they books were published (like can I go in and say the first book published in 1995 is book #1 and so on and so forth?) I guess I'm asking for custom post order but I don't see it in the screen options.

    July 19, 2015 at 10:44 pm #159852
    Brad Dalton
    Participant

    Is it an archive for a custom post type?

    If so, you can use pre_get_posts to order by date

    add_action( 'pre_get_posts', 'change_order' );
    function change_order( $query ) {
    	if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'books' ) ) {
    		$query->set( 'order', 'ASC' );
    	}
    
    }
    

    Tutorials for StudioPress Themes.

    July 21, 2015 at 9:43 am #159988
    renwil
    Participant

    No, I don't think so. Sorry, not exactly sure what that means. Take a look at this page - http://www.brendajackson.net/?book-series=madaris. The first book should be Tonight and Forever. From there, I want them in order of date of book publication. You can see a printable list of books here - http://www.brendajackson.net/?page_id=10.

    July 21, 2015 at 9:57 am #159991
    Brad Dalton
    Participant

    Do you want to create a new list of al books listed by the most recent date?


    Tutorials for StudioPress Themes.

    July 21, 2015 at 9:59 am #159992
    renwil
    Participant

    No, I want to have the books in each series (on their respective series page) in order like on the printable list.

    July 21, 2015 at 10:30 am #159996
    Brad Dalton
    Participant

    Tonight and Forever was published after Courting Justice based on the time of day as they where both published on the same day.

    Also, you have a plugin installed which modifies the order so any code you add may not work.


    Tutorials for StudioPress Themes.

    July 22, 2015 at 7:51 am #160090
    renwil
    Participant

    I just ended up doing it manually. Seemed like the easiest way to do it. Thanks for the help.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Author Pro theme – library post order’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble