Viewing 5 reply threads
  • Author
    Posts
    • #8731
      filippocatania
      Participant

      Sorry for my question, but I know little php and html.
      I have a website http://www.filippocatania.it that I built with Cosmos theme.

      I need to insert a snippet in the home page code before the tag </body>: I saw in the Appareance -> Editor but I have not found this tag.
      How add it?

      Thanks

      Best regards

      Filippo

    • #8732
      filippocatania
      Participant

      Can you write me the complete path of home page to modify the html code? Thanks

    • #8733
      ThemeofWP
      Keymaster

      Hey there, thanks for using & purchased our themes! you should need to set homepage under the Settings > Reading > Homepage page as homepage.

      By the way you should need to create a page named homepage with homepage template.

      If you click to import demo contents xml file under the Tools > Import you’ll get full demo contents like as the demo.

      You don’t need to edit any code from the theme editor.

      Also you can insert this snippet into the editor area (text mode)

      I hope those are clear.

      Thanks,
      Jenny J.

    • #8734
      filippocatania
      Participant

      Dear Jenny,

      my homepage is this:

      <?php
      get_header();

      $col= ‘col-md-12′;
      if ( themeofwp_option(”.$shortname.’_blog_sidebar’)==’left’ || themeofwp_option(”.$shortname.’_blog_sidebar’)==’right’ ) {
      $col = ‘col-md-9′;
      }
      ?>

      <!–/.theme-layout-start–>
      <?php echo themeofwp_layout() ;?>

      <!–/.container –>
      <div class=”container-fluid”>

      <!–/.row –>
      <div class=”row”>

      <!– sidebar left –>
      <?php if(themeofwp_option(”.$shortname.’_blog_sidebar’)==’left’){ ?>
      <?php get_sidebar(); ?>
      <?php } ?>
      <!– sidebar left –>

      <!– #content –>
      <div id=”content” class=”site-content <?php echo $col; ?>” role=”main”>

      <!– query posts –>
      <?php if ( have_posts() ) { ?>
      <?php while ( have_posts() ) { the_post(); ?>
      <?php get_template_part( ‘inc/post-templates/content’, get_post_format() ); ?>
      <?php } ?>
      <!– query posts –>

      <!– pagination –>
      <?php echo themeofwp_pagination(); ?>
      <!– pagination –>

      <?php } else { ?>
      <?php get_template_part( ‘inc/post-templates/content’, ‘none’ ); ?>
      <?php } ?>

      </div>
      <!– #content –>

      <!– sidebar right –>
      <?php if(themeofwp_option(”.$shortname.’_blog_sidebar’)==’right’){ ?>
      <?php get_sidebar(); ?>
      <?php } ?>
      <!– sidebar right –>

      </div><!–/.row –>

      </div><!–/.container –>

      </div><!–/.theme-layout-end–>

      <?php get_footer();

      I want see html code and no php. I see the code into the browser tools but they are not editable…
      How to do?

      Sorry for my english

    • #8735
      ThemeofWP
      Keymaster

      You need to open header.php and inser what you want before the body and you can inser anything after the body in footer.php.

    • #8736
      ThemeofWP
      Keymaster

      If you want to use this snippet only home page you will need to this rule like this:


      //put your code here//

Viewing 5 reply threads
  • You must be logged in to reply to this topic.