Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #58916

    Jeremy P
    Participant

    How do I edit header.php? I’ve found these instructions in wordpress:

    // Content is output based on which Stack has been selected in the Customizer.
    // To view and/or edit the markup of your Stack’s index, first go to “views”
    // inside the “framework” subdirectory. Once inside, find your Stack’s folder
    // and look for a file called “wp-header.php,” where you’ll be able to find the
    // appropriate output.

    But quite frankly I don’t understand them. Where am I finding this “framework” subdirectory?

    #58944

    Amanda C
    Participant

    I was wondering the same thing.

    #59365

    Christian
    Moderator

    Hey guys,

    You can find the “framework” directory in wp-content\themes\x\framework. An example of a stack folder is framework\views\renew.

    Hope that helps. 🙂

    #151278

    ggnrg
    Participant

    Why when I added this code to the header file above – I get duplicate quotation marks.

    This is what I added to my file through FTP – <meta name=”robots” content=”noindex, nofollow”>

    And this is what is in my header file live on the website – ” <meta name=””robots”” content=””noindex, nofollow””>”

    #151508

    Paul R
    Moderator

    Hi,

    Can you provide us your site url so we can take a closer look.

    You might be using fancy quotes instead of normal qoutes.

    Try changing the code to this.

    
    <meta name="robots" content="noindex, nofollow">
    

    Hope that helps. 🙂

    #279794

    wabizumai
    Participant

    HI i am trying to put web master verify text code in the header but as above it tells me to do it via framework sub directory i dont understand the reply above do you access this framework sub directory from your own dashboard all tutorials i have seen with other wordpress themes they just go to appearence editor and header php and paste code in the head, thanks

    #279970

    Rad
    Moderator

    Hi there,

    You don’t have to do it directly to the templates. You can simply add this code at your child theme’s functions.php

    add_action('wp_head', 'heads_meta');
    function heads_meta () { ?>
    <meta name="robots" content="noindex, nofollow">
    <!-- or your verification code -->
    <?php }
    

    Hope this helps.

    #374887

    mpangan
    Participant
    This reply has been marked as private.
    #375158

    Lely
    Moderator

    Hello There,

    Thanks for posting in and giving us your admin credentials.
    Please refer to this thread:https://community.theme.co/forums/topic/add-in-head/#post-185763

    Hope this helps.

    #743858

    ibracedirector2016
    Participant

    Hi, I want to add the following into my header tag, how do i do this?

    <script type=”text/j.avascript” src=”//js.causevox.com/v2″></script>

    <script type=”text/javascript”>

    CV.setDomain(“mycampaign.causevox.com”);

    </script>

    Obviously, I want to replace the url with my url where it says mycampaign

    #743865

    Lely
    Moderator

    Hello There,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Then add the following code on your child theme functions.php file.

    function my_head_custom_code() { ?>
    
     <script type="text/j.avascript" src="//js.causevox.com/v2"></script>
    
    <script type="text/javascript">
    
    CV.setDomain("mycampaign.causevox.com");
    
    </script>
    
    <?php }
    
    add_action( 'wp_head', 'my_head_custom_code' );

    Hope this helps.