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

    (@basszje)

    You can change the URL by adding that to the shortcode like :

    [maxbutton id=1 url=http://www.google.com] .

    If you want to change it per page you can do that ( replacing the id with your button id of course ).

    If you are editing a theme template you can call the shortcode using WordPress’ ‘do_shortcode’ function.

    Thread Starter heythem500

    (@heythem500)

    thanks for your reply
    Would you give me the exact php code to add it in the theme
    and when I did that where should I put “[maxbutton id=1 url=http://www.google.com] .” to call the button to appear in the target position

    Plugin Author Bas Schuiling

    (@basszje)

    In the theme then you are editing PHP. It’s very advisable to learn basic PHP first and always backup your files.

    Exact code would be :

    echo do_shortcode('[maxbutton id=1 url=http://www.google.com]');

    Where you should replace the id and the url with your PHP variables you want the values to be.

    Thread Starter heythem500

    (@heythem500)

    it can’t be like this for one reason because you add a link but I need variable like as EX “[maxbutton id=0 url=$url]’);
    let’s say the position is in somewhere in posts and every post will need to a different link according to the purpose
    I hope you got what I mean

    Plugin Author Bas Schuiling

    (@basszje)

    Like in your example, that’s just basic PHP and a little outside of the support scope here since it deals with your theme and programming. Just add the variable and make it change every post in your theme. There are many tutorials out there showing how to do this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how I add button in certain postion’ is closed to new replies.