• 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

Rearrange Books in Author Pro Library

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 › Rearrange Books in Author Pro Library

This topic is: resolved

Tagged: Author Pro, pre_get_posts

  • This topic has 2 replies, 2 voices, and was last updated 5 years, 9 months ago by SLIcore.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 20, 2019 at 12:51 pm #493666
    SLIcore
    Participant

    Hello StudioPress people!

    Long time user and first time poster. I figure someone has come across this issue.

    I have set a client up with the Author Pro theme and it's gone super great so far. The one small problem I have now is on the library page. How can I change the display order of the books using the Author Pro Plugin? The client wants them in order of publication and for some reason, the Author Pro Plugin chose them (by publication) 3, 1, 2. They aren't even alphabetical!

    So, am I totally blind or is there a setting to change this built into the plugin? I want to make sure before I hack the sucker myself. Please view our library for reference.

    Please let me know if more info is needed.

    https://dwayneclayden.com/book-author/dwayne-clayden/
    September 21, 2019 at 12:42 am #493671
    Brad Dalton
    Participant

    Should be able to use pre_get_posts to change the order

    Something like this :

    add_action( 'pre_get_posts', 'books_order' );
    function books_order( $query ) {
        if ( $query->is_main_query() && !is_admin() ) {
            if ( $query->is_tax() || $query->is_post_type_archive('books') ) {
                $query->set('orderby', 'meta_value_num');  
                $query->set('meta_key', 'sort_order');  
                $query->set('order', 'ASC'); 
            }       
        }
    } 
    

    You might need to change the conditionals and the orderby parameters.


    Tutorials for StudioPress Themes.

    September 21, 2019 at 8:55 am #493675
    SLIcore
    Participant

    That was kind of what I was thinking I would end up doing. Thanks for laying this out, Brad. That’s awesome! I really appreciate it. I will consider this solved as I really don’t think there is an actually setting for this. Have a great weekend!

    Jim

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Rearrange Books in Author Pro Library’ 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

© 2025 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