• Welcome to the all-new Kolakube support, the official place to get help for Marketers Delight, XFtoWP, CryptoWP, and other WordPress products! Please login with your account details to access private support forums.
  • Support reminder: Please do not use private messaging for product support. Post questions to the respective forums to get help.

Need to add Header Version Number

Atiqur Rahman

Member
Md
Messages
7
Reaction score
3
Just today I have purchased md. So First I want to say I am very happy to join the MD community.

Second, I have a very funny question to ask, I need help with how to add header version numbers as like; https://xftowp.com/

Thanks,
ATIQ
 

Alex

MD developer
Staff member
Md
XFtoWP
Messages
6,489
Reaction score
1,820
Hi @Atiqur Rahman, glad to have you on board with MD. :) Thanks for your patience with my response, I was mostly offline yesterday.

Ah, the header badge is one of my favorite details! Here's how I added it:

First, in your child theme functions.php file you can hook the badge code to go next to your logo:

PHP:
/**
 * Adds badge to header, next to logo.
 *
 * @since 1.0
 */

function md_add_header_badge() { ?>
    <a href="https://xftowp.com/stream/" class="header-badge badge">1.3</a>
<?php }

add_action( 'md_hook_header_logo_bottom', 'md_add_header_badge', 12 );

and if you want to adjust the style of it, here's the simple CSS code you can add to style.css, or wherever you use custom CSS:

CSS:
.header-badge.badge {
    background-color: red;
    color: #555;
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    margin-left: 6px;
    padding: 6px 5px 5px;
    position: relative;
        top: -7px;
}

Let me know how that goes!
 
Comment

Atiqur Rahman

Member
Md
Messages
7
Reaction score
3
Hi @Atiqur Rahman, glad to have you on board with MD. :) Thanks for your patience with my response, I was mostly offline yesterday.

Ah, the header badge is one of my favorite details! Here's how I added it:

First, in your child theme functions.php file you can hook the badge code to go next to your logo:

PHP:
/**
 * Adds badge to header, next to logo.
 *
 * @since 1.0
 */

function md_add_header_badge() { ?>
    <a href="https://xftowp.com/stream/" class="header-badge badge">1.3</a>
<?php }

add_action( 'md_hook_header_logo_bottom', 'xftowp_theme_version', 12 );

and if you want to adjust the style of it, here's the simple CSS code you can add to style.css, or wherever you use custom CSS:

CSS:
.header-badge.badge {
    background-color: red;
    color: #555;
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    margin-left: 6px;
    padding: 6px 5px 5px;
    position: relative;
        top: -7px;
}

Let me know how that goes!
I got an error after adding this code.

Here it is;

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'xftowp_theme_version' not found or invalid function name in /home/example.com/wp-includes/class-wp-hook.php on line 303

Can you check and assist me?

Also, I am facing another trouble with active share buttons. I can't active some of the buttons.
Please check the attached image. Thanks.
 

Attachments

  • Untitled.png
    Untitled.png
    33.8 KB · Views: 5
Comment

Alex

MD developer
Staff member
Md
XFtoWP
Messages
6,489
Reaction score
1,820
Comment
Top