ThemeShaper Forums » Thematic

[closed]

How to add facebook like button for a website next to the header?

(4 posts)
  • Started 3 years ago by markvd3
  • Latest reply from markvd3
  • This topic is not resolved
  1. hi im new here. i would like to put a like button directly next to my website header image like in the same row with no clear both. directly adjacent to it. when i try to edit the thematic parent theme it does add the like button but it alway put it below my header image. im guessing i need to edit my function file lol. any help would be awesome! thanks in advance.

    Posted 3 years ago #
  2. bpompea
    Member

    you should write something like this in your functions.php in the child theme. make sure this code is inside the pre existing functions.php php tags.

    function additional_header_content() {
    ?>

    // your code here //

    <?php
    }

    add_action('thematic_blogtitle', 'additional_header_content', 3);

    Posted 3 years ago #
  3. bpompea
    Member

    also it depends on where your header image is located. i used a hook to place it next to your blog title, but your image might be in the branding div or the access div. just replace the last line of code with the hook that you need. a list of hooks can be found here: http://themeshaper.com/thematic/guide/?page_id=10

    Posted 3 years ago #
  4. it doesnt seem to be working out for me. my header image is in the branding div. i tried

    function additional_header_content() {
    ?>

    <div class="fb-like" data-href="http://www.mysite.com" data-send="false" data-width="450" data-show-faces="false"></div>

    <?php
    }

    add_action('thematic_brandingopen', 'additional_header_content', 1);

    and i put the facebook javascript sdk script in the parent themes header. and it didnt work. im just trying to learn since i am a beginner to php and everything :) thanks

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.