This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

How to add widget into #header_content

  • Creator
  • #11887

    Hi there!

    I’m trying to add the GTranslate widget into the #header_content area, but do not know where the files is to add the code.

    I’ve tried adding it in the “Ads Above Header” widget location in the admin panel, but it puts the widget above the header in a div with the class .header_above.

    Anyway I could put that widget into the #header_content (header content area) so I can style it appropriately?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #11896
    Jason Bobich


    This will be a customization you’ll need to make from your child theme. Taking the extra step of actually creating a widgetized area for your header may be a little more difficult. I would start with experimenting in the basics of how action hooks and a child theme work before stepping into registering and outputting new widget areas.

    Here’s an introduction to using a child theme:

    Here are how action hooks work in WordPress

    And here is a map of the theme’s action hooks:

    You’d find the appropriate action hook for where you want to add your content and start with something like this in your child theme’s functions.php:

    function my_header_addon() {
    	// your custom output goes here ...
    add_action( 'themeblvd_header_addon', 'my_header_addon' );

    Are you using this plugin? — Then, it looks like they have a shortcode [GTranslate] you can use. WordPress also has a function do_shortcode that will allow you to output a shortcode from within your PHP (i.e. your hooked function).

    do_shortcode( '[GTranslate]' );

    thanks! i needed t get a shortcode into the header and do shortcode worked.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The forum ‘Swagger Responsive WordPress Theme’ is closed to new topics and replies.