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.

adding php do display right next to header logo

  • Creator
    Topic
  • #22669
    sandstar
    Participant

    Hi! I would like to use custom social icons, which have both shortcode [aps-social id=”2″] and php template code <?php echo do_shortcode(‘[aps-social id=”2″]’)?> display options.

    I would like this to appear right next to the header logo image (immediately to the right).

    I’ve been looking around and am still not sure the best way to do it. I tried making a widget area “ads above header” but it didn’t display the shortcode and also I would prefer it to be to the right of the logo.

    I see the action hooks and I think the location I want is themeblvd_header_addon, is that right? How would I integrate that into my code?

    Thank you!

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

    The general WordPress concepts of child theme development and using action hooks and filters is something you’re going to need to start to digest and do some research on, if you want to go that route.

    Yup, I would say the themeblvd_header_addon action would probably be a good action to hook to from your child theme’s functions.php.

    Please see this tutorial and try to conceptualize what it is you’re actually doing: http://dev.themeblvd.com/tutorial/actions/#example

    Here’s an example, that would go in your child theme’s functions.php:

    function my_header_addon() {
    	echo do_shortcode('[aps-social id="2"]');
    }
    add_action('themeblvd_header_addon', 'my_header_addon');
    #22677
    sandstar
    Participant

    Yes that makes sense, thanks!!

    #26147
    sandstar
    Participant

    Is there a simple way to add css styling to this themeblvd_header_addon area?

    #26148
    Jason Bobich
    Keymaster

    Any CSS you add will always go in your child theme style.css, no matter what area of the site you’re targeting.

    #26149
    sandstar
    Participant

    Right, i am adding it to the custom css box but it’s not seeming to take any effect.
    is it just:
    .themeblvd_header_addon {
    padding-left: 100px;
    }

    thanks!

    #26150
    Jason Bobich
    Keymaster

    Where are you getting the CSS class “themeblvd_header_addon” from? When you’re trying to build a selector for making a CSS customization, you want to use your web browser’s inspector and look at the HTML markup. I can’t tell you what that is because I have no idea what you’ve added to your site at that action hook.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.