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
    Topic
  • #11887
    ithouse
    Participant

    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!

    http://ithhostels.com/

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

    Hello,

    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:

    https://vimeo.com/70832266

    Here are how action hooks work in WordPress

    http://dev.themeblvd.com/tutorial/actions/

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

    http://dev.themeblvd.com/tutorial/primary-framework-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? http://wordpress.org/plugins/gtranslate/ — 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]' );
    #12347
    abcportals
    Member

    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.