Community Forums › Forums › Archived Forums › Design Tips and Tricks › Author Pro – Two questions about buy buttons
Tagged: Author Pro, Author Pro Plugin, css
- This topic has 12 replies, 4 voices, and was last updated 9 years, 5 months ago by killyman.
-
AuthorPosts
-
April 18, 2015 at 8:18 pm #148388brightislandParticipant
I'm in the planning stages of developing a new website for a client using the Author Pro theme.
I've installed the theme on a test domain along with the Author Pro plugin, but I'm wondering if there is a way to do two things:
1) Is it possible to display more "Buy" buttons? It only allows for three right now, but my client wants at least five buttons for each book.
2) I'm assuming I could display images of consistent sizes for the various online vendors instead of the default buttons if I put that in the css, right?
Thanks in advance. We're really excited about this theme!
May 10, 2015 at 12:22 pm #151552GingerParticipantHi there,
Do you have a link to your test site where you could reference specific pages for your questions? But yes all of this should be customizable, just depends how much code/css you'd be willing to change.
@gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options
May 19, 2015 at 12:28 pm #152780brightislandParticipantJust wanted to update... I've figured out how to update the code, but now we're thinking we'll keep it simpler and stick with the available button areas.
June 15, 2015 at 7:24 pm #156332miamMemberbrightisland, I know it's been a month, but do you still have the code? I'm trying to figure out how to add a button for a fourth vendor. Thanks!
June 15, 2015 at 7:31 pm #156335brightislandParticipantIt involves tweaking the php in the actual Author Pro plugin. The only problem with that is that you'd have to redo the tweak whenever there is an update to the plugin (as far as I know.)
I decided against doing it for that very reason. Do you still want to know how, though?
June 15, 2015 at 7:35 pm #156336miamMemberI do, thank you! I was able to tweak it so there's a place to enter the info for a 4th button but couldn't figure out how to display it.
June 15, 2015 at 7:49 pm #156337brightislandParticipantYou need to add one more array to this in the plugin file genesis-author-pro/classes/class.Genesis_Author_Pro_Book_Meta.php. It will have three, but you need to add a fourth.
array( 'name' => 'button_1', 'label' => __( 'Button 1', '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_2', 'label' => __( 'Button 2', '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_3', 'label' => __( 'Button 3', '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_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', ),
June 15, 2015 at 7:52 pm #156338brightislandParticipantI think there may be another file to tweak code, but I can't find it at the moment. :-\
Let me know if the above works or doesn't and I'll try to come back to this with a better answer tomorrow, if necessary.
June 15, 2015 at 7:58 pm #156339miamMemberThanks for the help. Unfortunately, I already made it that far. That adds a fourth button to the metadata in a book's listing, but doesn't actually display it below the other three.
June 16, 2015 at 9:46 am #156403brightislandParticipantUnfortunately, I have searched and searched through the plugin but I cannot find the other location where you tell it to display the fourth button. I'm sorry I can't be of more help.
June 16, 2015 at 1:56 pm #156420miamMemberThanks so much for looking! I suppose there's some comfort in knowing it wasn't an easy fix I just missed. I suspect I'll need to hire a pro just to figure out this part.
June 16, 2015 at 2:13 pm #156422brightislandParticipantI know what you mean! 🙂
Personally, I recommend Brad Dalton. I've hired him to do little things for me before and he's a big help.
This is his website, but of course he's on the forums, too:
June 25, 2015 at 2:46 pm #157539killymanMemberFULL 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
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.