• I am having difficulty adding some code to my homepage. The code source can be viewed at hostmamas.com/domain.html. I would like to add this code under my slider, but above the feature circles on my home page. I added the code into the WordPress Text box and it is showing up on my homepage under the feature circles, which is not a huge deal (not ideal), but my #1 issue before figuring that out is that the code is not working properly to call the search function now that I have pasted it in http://www.hostmamas.com.

    I am not overly familiar with editing files and was not sure what file to add this code to in order to get it on my home page. Can you assist? Any advice appreciated. I can hop into Filezilla and do copy/paste if someone is able to point me in the right direction of which file to paste this code I have into…

    Thanks,
    Kali

Viewing 1 replies (of 1 total)
  • Hello,
    you can’t put javascript (or php) code directly in the “content” of your posts/page.
    How to do that then.
    I suggest you to create a child-theme.

    Then you can add html or javascript with wordpress hooks. So appending something like the following to your brand new child-theme functions.php :

    function content_before_fp(){
      ?>
      <!--  PUT ALL YOUR STUFF BELOW -->
    
      <!-- END STUFF -->
      <?php
    }
    add_action  ( '__before_fp', 'content_before_fp');

    Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Home Page File help to get code working’ is closed to new replies.