This topic has 8 replies, 3 voices, and was last updated 8 years by sharmstr.

  • Author
  • #110237
     lowkeytraxx
    Participant

    Im trying to add something to this line of code but I cant find the file that it is located in.. Please help

     

    <div class=”template-page col-sm-9 tpl-right”>
    <div class=”wrap-content”></div>

    #110325
     rikbutterflyskull
    Participant

    wrap-content is the main container, the same container that show pages content, post content and is a core part of code. There is no reason to edit wrap part and risk to break the whole site, cause all you create with pages/post edit/visual composer are inside wrap-content

    #110367
     sharmstr
    Moderator

    Its located in /page-parts/general-before-wrap.php. There is a hook that will allow you to inject content there called kleo_before_main_content. What are you looking to do?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #110523
     lowkeytraxx
    Participant

    I just want to place a add before the content

    #110586
     lowkeytraxx
    Participant

    How do I use the hook to put a Adsense code?

    #110727
     sharmstr
    Moderator

    In your child theme’s functions.php file, use this code

    COPY CODE
    
    add_action('kleo_before_main_content', 'inject_adsense', 10);
    function inject_adsense() {
        //your adsense code here
    }
    

    Here is a list of hooks: https://archived.seventhqueen.com/documentation/kleo#hooks

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #110886
     lowkeytraxx
    Participant

    That didnt work sadly

    #110903
     sharmstr
    Moderator

    The inject code does work. So perhaps you are not inputting your adsense code correctly. See if I change the code I gave you to inject a “Hello, World” message, it does display on the site.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    Attachments:
    You must be logged in to view attached files.
    #111159
     sharmstr
    Moderator

    Looks like you’ve got it sorted now.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?