Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author johnbhartley

    (@johnbhartley)

    Two part answer and you can choose however you would like to make this happen.

    First, you’ll have to use the shortcode in the header.php file (generally it is recommended to create a child theme first. Once you begin editing header.php, add the following, but replace x and y with your actual button numbers:

    <php echo do_shortcode('[maxbutton id="x"]'); ?>
    <php echo do_shortcode('[maxbutton id="y"]'); ?>

    The function do_shortcode() allows you to use the shortcode outside of the normal WordPress editor.

    Now onto the CSS. In Theme Options, add the following:

    .logo {
    position: relative;
    }
    
    .maxbutton-1, .maxbutton-2 {
    position: absolute !important;
    top: 0;
    }
    
    .maxbutton-1 {
    right: 0;
    }
    
    .maxbutton-2 {
    right: 100px;
    }

    Hope that helps.

    Thread Starter fypp

    (@fypp)

    Hello, and thanks for your help.

    Well, it isn’t working for me. I entered the css code above into the editor and nothing happened. Help…:)

    Plugin Author johnbhartley

    (@johnbhartley)

    Can you send a link to the page where the buttons have been put in and the CSS has been added?

    Thread Starter fypp

    (@fypp)

    sure! it is
    foryourprivilegedpets.com

    thanks alot for your help.. this can be very confusing to me:)

    Plugin Author johnbhartley

    (@johnbhartley)

    Where are your buttons on the page? Did you add the shortcodes to your header.php file?

    Make sure you put them right after the <?php bloginfo(‘name’); ?>” /> in the header.php file.

    Thread Starter fypp

    (@fypp)

    ok, I did what you said, placed the shortcodes into the header.php file. but now the shortcodes are showing on the main page, not the buttons.
    not sure what I am doing wrong.

    Plugin Author johnbhartley

    (@johnbhartley)

    Did you use this code? Or did you just add the shortcode itself.

    <?php echo do_shortcode('[maxbutton id="x"]'); ?>
    <?php echo do_shortcode('[maxbutton id="y"]'); ?>

    If it’s not wrapped in the PHP, it will just show the shortcode.

    Plugin Author johnbhartley

    (@johnbhartley)

    Also, make sure it is outside of the tags or everything will link to the home page with the logo.

    <div class="logo"> <a href="<?php echo home_url(); ?>"><img src="<?php if (inkthemes_get_option('colorway_logo') != '') { ?><?php echo inkthemes_get_option('colorway_logo'); ?><?php } else { ?><?php echo get_template_directory_uri(); ?>/images/logo.png<?php } ?>" alt="<?php bloginfo('name'); ?>" /></a> <?php echo do_shortcode('[maxbutton id="1"]'); ?><?php echo do_shortcode('[maxbutton id="2"]'); ?></div>

    Thread Starter fypp

    (@fypp)

    well we are getting somewhere, one of the buttons is showing but the other just shows the text on the button. I am going to go back and look at the way I entered the code. maybe I did not space it correctly?

    Plugin Author johnbhartley

    (@johnbhartley)

    If you are still having issues and would like me to take a look at the admin side, send me your login credentials at john@maxfoundry.com

    Plugin Author johnbhartley

    (@johnbhartley)

    Fixed on the admin side

    BHGdesigns

    (@bhgdesigns)

    I am having the same issue about placing the button at the top of my page over the header. I can get one button to show, but need 4. I would like them on the right side and in a vertical row. Here is the code I am using in my css.
    .logo {
    position: relative;
    }

    .maxbutton-12, .maxbutton-13, .maxbutton-14, .maxbutton-15 {
    position: absolute !important;
    }
    .maxbutton-12 {
    top: 10;
    Right: 0;
    }
    .maxbutton-13 {
    top: 40;
    Right: 0;
    }
    .maxbutton-14 {
    top: 70;
    Right: 0;
    }
    .maxbutton-15 {
    top: 100;
    Right: 0;
    }

    Plugin Author johnbhartley

    (@johnbhartley)

    What part is not looking right for you?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘button placement at the top of page’ is closed to new replies.