Forum Replies Created
-
AuthorPosts
-
killymanMember
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;
killymanMemberSOLVED!
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() ) {
killymanMemberSo there is no hack we can do in the child theme functions.php file to make this work without affecting the plugin?
killymanMemberFULL 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.phpIn 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.phpON 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! -
AuthorPosts