• Hi all,

    I am looking to add shortcode to the right hand side of my header, using the astra theme.

    Please note that I Have not displayed a menu.

    I added the following shortcode to the header.php file:

    <?php
    echo do_shortcode(‘[wp-dt-custom format=”l, jS F o”] <br/>
    [wp-dt-custom format=”G:i”]’);
    ?>

    How can I set it to be displayed to the right hand side, in the same place where the menu usually is?

Viewing 1 replies (of 1 total)
  • Hello @liftoffofficial

    I am not sure, why the code is not working unless it correct and fetching the correct data.

    While we would recommend if you are using the same in the Child Theme otherwise the code will be flushed on updating the parent theme.

    Also, if you are using the Elementor page builder we recommend using the Elementor – Header Footer plugin which will help you insert the custom shortcode and display them as required.

    I hope that helps.

    Regards,
    Suman

Viewing 1 replies (of 1 total)
  • The topic ‘Astra: Adding Shortcode to Header’ is closed to new replies.