Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #817225

    peter4576
    Participant

    I was trying to insert a short-code for log-in/ log-out in the second header. But you have not made this possible in your theme.

    Can you please advice on how to insert a short-code here?

    Also (suggestion) I think you should make the 2nd header more flexibile, in order to e.g. turn off the social links and e.g. insert log-in text instead.

    Thanks
    Peter

    #817622

    Prasant Rai
    Moderator

    Hello Peter,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    Thanks.

    #821418

    peter4576
    Participant
    This reply has been marked as private.
    #821488

    Rupok
    Member

    Hi there,

    Thanks for writing in! You can use HTML on the topbar area. If you need to use shortcode then you can try the Header Widget Areas.

    Cheers!

    #832401

    peter4576
    Participant

    Hi there. Header Widget Area is an absolute no go.

    There is no chance you will enable short codes for the header?

    #832858

    John Ezra
    Member

    Hi there,

    Thanks for writing in! There aren’t any plans at the moment to do this. What you can do is use a test page to use your shortcode. Save and view the source code. The generated HTML will show, you can then copy that HTML and use it in the topbar.

    It’s not convenient but it is a workaround you can apply.

    Hope this helps – thanks!

    #832866

    Rad
    Moderator

    Hi Peter,

    Not yet, but you can try this solution. Add this code to your child theme’s functions.php

    add_filter('x_option_x_topbar_content', 'do_shortcode');

    This will enable shortcode on your topbar’s content. When you’re done, please add your shortcode within your topbar’s content.

    Hope this helps.

    #849194

    peter4576
    Participant
    This reply has been marked as private.
    #849209

    Lely
    Moderator

    Hi Peter,

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    For the meantime, please also add this shortcode on your topbar for testing purposes only.
    [icon type="adjust"]

    Always,
    X

    #850810

    peter4576
    Participant
    This reply has been marked as private.
    #850832

    Paul R
    Moderator

    Hi Peter,

    Thank you for providing your login credentials.

    Upon checking, I can see the icon shortcode works on your top bar which means that shortcodes are now enable in your topbar content.

    Please note that there is no loginout shortcode by default

    To add that link in your topbar, create file _topbar.php in wp-content/themes/x-child/framework/views/global
    then copy the code below into that file.

    
    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_TOPBAR.PHP
    // -----------------------------------------------------------------------------
    // Includes topbar output.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>
    
      <div class="x-topbar">
        <div class="x-topbar-inner x-container max width">
          <span class="wploginout"><?php wp_loginout(); ?></span>
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?>
          <?php x_social_global(); ?>
          
        </div>
      </div>
    
    <?php endif; ?>
    

    Hope that helps