• 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

killyman

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
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 16, 2015 at 10:31 pm in reply to: 2.2.4 Update and the layout problem #174004
    killyman
    Member

    In the meantime, this worked for me.

    Advice from StudioPress’s Facebook page…

    If you’re having the layout issue with 2.2.4, change the following line in lib/functions/layout.php (line 343) to this:

    $post_id = is_home() ? get_option( ‘page_for_posts’ ) : null;

    August 12, 2015 at 12:11 am in reply to: Author Pro – Display Series Books All On One Page #162121
    killyman
    Member

    SOLVED!

    I finally figured it out after a bit more persistence. Just in case anyone else is trying to accomplish the same thing.

    I added the following to my Author Pro's functions.php file.

    add_action( 'pre_get_posts', 'change_book_posts_per_book_series_page' );
    
    function change_book_posts_per_book_series_page( $query ) {
    	
    	if ( $query->is_tax( 'book-series' ) && $query->is_main_query() ) {
    		$query->set( 'posts_per_page', '100' );
    	}
    
    }

    The key was this line of code which I had to make sure to reference is_tax and then book-series.

    if ( $query->is_tax( 'book-series' ) && $query->is_main_query() ) {
    June 25, 2015 at 3:06 pm in reply to: Author Pro – Adding Buttons to Book Pages #157541
    killyman
    Member

    So there is no hack we can do in the child theme functions.php file to make this work without affecting the plugin?

    June 25, 2015 at 2:46 pm in reply to: Author Pro – Two questions about buy buttons #157539
    killyman
    Member

    FULL DETAILS FOR PLUGIN HACK

    STEP 1 OF 2

    First open up class.Genesis_Author_Pro_Book_Meta.php file located in...
    wp-content/plugins/genesis-author-pro/functions/class.Genesis_Author_Pro_Book_Meta.php

    In my case I added two additional arrays for buttons 4 and 5

    array(
    'name' => 'button_4',
    'label' => __( 'Button 4', 'genesis-author-pro' ),
    'description' => __( 'This will create a button on the book page that can be used as a link for purchase, download, etc.', 'genesis-author-pro' ),
    'type' => 'button',
    ),
    array(
    'name' => 'button_5',
    'label' => __( 'Button 5', 'genesis-author-pro' ),
    'description' => __( 'This will create a button on the book page that can be used as a link for purchase, download, etc.', 'genesis-author-pro' ),
    'type' => 'button',
    ),

    STEP 2 OF 2

    Then you have to open template.php file located in...
    wp-content/plugins/genesis-author-pro/functions/template.php

    ON OR AROUND LINE 455 - you need to add the reference to any additional buttons after button 3. For example, in my case I added two more buttons called button 4 and button 5. See below.

    $buttons = array( 'button_1', 'button_2', 'button_3', 'button_4', 'button_5' );

    FINAL NOTES
    As discussed before, if the plugin gets updated, you'll lose those additional buttons you added unless you go back in and hack away at it again. Happy Hacking!

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

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