• lastroundfilms

    (@lastroundfilms)


    Hi there,

    I’ve had a look at a couple of posts on inserting a button into the header but I haven’t had any luck with doing it on my website.

    I anted to add a contact button in the top right corner of my website.

    I have tried adding the following any so many places but it hasn’t worked (sometime the button shows up, but it’s actually beneath the header, and it messes up the header too.

    <?php echo do_shortcode(‘[maxbutton id=”1″]’); ?>

    Here is the code on my header page, maybe you could point me to where I need to integrate it?
    Thanks a lot for your help!!!

    <?php
    /*
    * @ Header
    */
    ?>
    <!doctype html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″ />
    <link rel=”profile” href=”http://gmpg.org/xfn/11&#8243; />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php
    $fav_icon = of_get_option(‘general_fav_icon’);
    if ( isSet($fav_icon) && !empty($fav_icon) ) {
    echo ‘<link rel=”shortcut icon” href=”‘.esc_url( $fav_icon ) . ‘” />’;
    }
    wp_head();
    ?>
    </head>
    <body <?php body_class(); ?>>
    <?php
    do_action(‘mtheme_contextmenu_msg’);
    do_action(‘mtheme_preloader_check’);
    //Demo Panel if active
    do_action(‘mtheme_demo_panel’);
    //Check for sidebar choice
    do_action(‘mtheme_get_sidebar_choice’);
    //Mobile menu
    if ( !mtheme_is_fullscreen_home() && !is_404() ) {
    get_template_part(‘/includes/background/background’,’display’);
    }
    if ( mtheme_is_fullscreen_home() ) {
    $featured_page=mtheme_get_active_fullscreen_post();
    $custom = get_post_custom( $featured_page );
    if ( isSet($custom[ MTHEME . “_fullscreen_type”][0]) ) {
    $fullscreen_type = $custom[ MTHEME . “_fullscreen_type”][0];
    }
    if ($fullscreen_type==”photowall” || $fullscreen_type==”carousel” ) {
    get_template_part(‘/includes/background/background’,’display’);
    }
    }
    if (is_page_template(‘template-blank.php’)) {

    $site_layout_width=’fullwidth’;

    } else {

    get_template_part(‘/includes/menu/mobile’,’menu’);
    //Header Navigation elements
    get_template_part(‘header’,’navigation’);
    }
    echo ‘<div id=”home” class=”container-wrapper container-fullwidth”>’;
    if (!mtheme_is_fullscreen_post()) {
    $header_menu_type = of_get_option(‘header_menu_type’);
    if (MTHEME_DEMO_STATUS) {
    if (isSet($_GET[‘menu_type’])) {
    $header_menu_type = mtheme_demo_data_fetch($_GET[‘menu_type’]);
    }
    }
    if ($header_menu_type==”vertical-menu”) {
    echo ‘<div class=”vertical-menu-body-container”>’;
    }
    }
    if (!is_page_template(‘template-blank.php’) && !mtheme_is_fullscreen_post() ) {
    get_template_part(‘header’,’title’);
    }
    $post_type = get_post_type( get_the_ID() );
    $custom = get_post_custom( get_the_ID() );
    $mtheme_pagestyle=”;
    $header_menu_type = of_get_option(‘header_menu_type’);
    if (MTHEME_DEMO_STATUS) {
    if (isSet($_GET[‘menu_type’])) {
    $header_menu_type = mtheme_demo_data_fetch($_GET[‘menu_type’]);
    }
    }
    if ($header_menu_type == “boxed-header-middle” || $header_menu_type == “boxed-header-left”) {
    echo ‘<div class=”vertical-left-bar”></div>’;
    echo ‘<div class=”vertical-right-bar”></div>’;
    }
    if (isset($custom[MTHEME . ‘_pagestyle’][0])) { $mtheme_pagestyle=$custom[MTHEME . ‘_pagestyle’][0]; }
    if (!mtheme_is_fullscreen_post()) {
    echo ‘<div class=”container clearfix”>’;
    }
    ?>

    https://ww.wp.xz.cn/plugins/maxbuttons/

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

    (@basszje)

    The shortcode looks right. The theme controls most of how any page within WordPress looks and usually in the header this can become quite a hassle.

    If you post a link to your website I can quickly check why it’s behaving like it is, but probably you’ll need some custom CSS code to make it work right with your theme’s header.

    Thread Starter lastroundfilms

    (@lastroundfilms)

    Hi!
    Thanks for your reply!

    Here is my page, the idea was to have the link top right in the header (at the opposite of the social media links)

    link: http://192.249.122.149/~lastro8/

    Thanks for your time and help!!

    Plugin Author Bas Schuiling

    (@basszje)

    It looks like you are are loading the site via JS, so to make the buttons show I think you have to add ‘style=”inline”‘ to the shortcode.

    Other than that you probably have to add some floats ( you can try if that works via the container options in the button editor ) and eventually some other custom theme design to make it fit in there.

    Thread Starter lastroundfilms

    (@lastroundfilms)

    Ok, thanks for your reply, so the shortcode should be something like this??

    <?php echo do_shortcode(‘[maxbutton id=”1″]’style=”inline”); ?>

    Sorry I’m not very familiar with all this!!
    Thanks!

    Plugin Author Bas Schuiling

    (@basszje)

    Within the shortcode: <?php echo do_shortcode('[maxbutton id="1" style="inline"]'); ?>

    Thread Starter lastroundfilms

    (@lastroundfilms)

    Ok thanks, and where abouts should I place that in the code of the page?

    I put it at the top of the header and if you check my page now you can see the problem I was telling you about. The header is messes up and the button is behind it top left.

    Thanks a lot for your time!!!

    Plugin Author Bas Schuiling

    (@basszje)

    Seems like now it’s not in the header, but I can’t tell really because your site is so heavy depending on Javascript it’s going to be difficult.

    If I add custom style to the button :

    position: absolute
    top: 15px;
    right: 10px;
    z-index: 1000;

    Then it’s looking already much better. You can add custom css via het plugin or somehow via the theme.

    However this is way and beyond plugin support really. You should maybe talk to your theme developer.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Adding maxbuttons to the header’ is closed to new replies.