• 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 – Two questions about buy buttons

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 – Two questions about buy buttons

This topic is: not resolved

Tagged: Author Pro, Author Pro Plugin, css

  • This topic has 12 replies, 4 voices, and was last updated 7 years, 7 months ago by killyman.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • April 18, 2015 at 8:18 pm #148388
    brightisland
    Participant

    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 #151552
    Ginger
    Participant

    Hi 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 #152780
    brightisland
    Participant

    Just 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 #156332
    miam
    Member

    brightisland, 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 #156335
    brightisland
    Participant

    It 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 #156336
    miam
    Member

    I 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 #156337
    brightisland
    Participant

    You 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 #156338
    brightisland
    Participant

    I 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 #156339
    miam
    Member

    Thanks 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 #156403
    brightisland
    Participant

    Unfortunately, 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 #156420
    miam
    Member

    Thanks 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 #156422
    brightisland
    Participant

    I 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:

    http://wpsites.net/

    June 25, 2015 at 2:46 pm #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 13 posts - 1 through 13 (of 13 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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