Add Code below post content

Discussion in 'PHP' started by Areesha Noor, May 29, 2014.

  1. #1
    Hello All of members I am using travelify wordpress theme.
    I want to add social media button code manually below post content. but I am confused how to add this?
    Please search for this theme in Google and tell me where to add code?
    In another theme I used these button in single.php page but in travelify wordpress theme single.php page is different
    this is the single.php page of travelify wordpress theme.
    Please check it and guide me.
    Thanks in advance.


    <?php
    /**
    * Displays the single section of the theme.
    *
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php
       /**
        * travelify_before_main_container hook
        */
       do_action( 'travelify_before_main_container' );
    ?>
    
    <div id="container">
       <?php
         /**
          * travelify_main_container hook
          *
          * HOOKED_FUNCTION_NAME PRIORITY
          *
          * travelify_content 10
          */
         do_action( 'travelify_main_container' );
       ?>
    </div><!-- #container -->
    
    <?php
       /**
        * travelify_after_main_container hook
        */
       do_action( 'travelify_after_main_container' );
    ?>
    
    <?php get_footer(); ?>
    Code (markup):

     
    Areesha Noor, May 29, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    First off, it's not our job to find the theme and look through it. It's your job.
    Looking at the code from the single.php-file, it seems they've created a hook-system for using the theme - and looking at the code present, it seems the hook you're looking for is the travelify_after_main_content - look for that, most likely in the functions.php-file included in the theme. Or just do a search through all the files in the theme and see where the actual assignment of the hook shows up. Depending on what is included in that hook, you can probably include the code for the social buttons within that hook.
     
    PoPSiCLe, May 29, 2014 IP
  3. Areesha Noor

    Areesha Noor Greenhorn

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #3
    very very thanks dear. Yes it's my job so that I share this code here. ok I try it. see you after checking code.
     
    Areesha Noor, May 29, 2014 IP
  4. Cyber Criminal

    Cyber Criminal Well-Known Member

    Messages:
    104
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    121
    #4
    Hi Areesha,

    Paste your social media buttons code after closing tag of container. That would do!

    Regards,
    CC
     
    Cyber Criminal, Jun 23, 2014 IP