Support » Plugin: WordPress Button Plugin MaxButtons » Using same button to link to many URLs

  • Resolved danallen

    (@danallen)


    Is it possible to use the same button many times with different URLs linked to it in each instance? I’d like to use the same “Buy now on Amazon” button for many different products without having to create a unique button for every individual item, since it will look exactly the same. I tried overriding the button’s properties with the basic WordPress linking feature, but that seems to have no effect on the preset URL link attached to the button. And when I remove any preset link, the button links simply to the post’s own URL.

    http://wordpress.org/extend/plugins/maxbuttons/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author maxfoundry

    (@maxfoundry)

    Yes, you can do this with a little PHP and the url parameter for the button shortcode, as such:

    <?php echo do_shortcode('[maxbutton id="17" url="http://website.com/"]') ?>

    Change the ID, of course, then replicate this code where you need it, passing in a different url.

    Sorry for being slow, but where exactly would you put that PHP code? I tried adding it to the text editor of a post but that didn’t work (nothing happened).

    Thanks.

    My site is http://reswpthemes.com, if you want to take a look.

    Plugin Author maxfoundry

    (@maxfoundry)

    You have to edit your theme’s template files to use that PHP code.

    Plugin Author maxfoundry

    (@maxfoundry)

    Sorry, forgot to mention that you can also do this without editing theme files. Just use the shortcode as such in any content:

    [maxbutton id="17" url="http://website.com"]

    Then reuse that shortcode with the same button id elsewhere, changing the url parameter as needed.

    Plugin Author johnbhartley

    (@johnbhartley)

    Marking as resolved. Happy to re-open if you’re still having problems.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using same button to link to many URLs’ is closed to new replies.