Results 1 to 3 of 3
  1. #1

    red flag /common/tpl_header.php some words with if home page to display

    hello,
    i want the custom h1 display if in home page,and in /common/tpl_header.php,so how to do this?
    because if not home page,it will have tow h1,i think it will be don't friendly for seo,so i need it only display in home page,so how to add if for this code:
    <div class="clearBoth"></div>
    <h1><span>Hot Sale Brands name : </span><a target="_blank" href="womens-handbags-c-11_13"/><span>Tote Handbags</span></a><span>&nbsp;&nbsp;</span><a target="_blank" href="womens-shoes-boots-c-16_17"/><span>Womens Shoes</span></a><span>&nbsp;&nbsp;</span><a target="_blank" href="womens-high-heels-c-16_17_26"/><span>High Heels</span></a><span>&nbsp;&nbsp;</span><a target="_blank" href="girls-sandals-c-16_17_29"/><span>Sandals</span></a></h1>
    <!--bof-mega menu display-->
    <?php
    require($template->get_template_dir('tpl_mega_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_mega_menu.php');?>
    <!--eof-mega menu display-->

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    6,641
    Plugin Contributions
    8

    Default Re: /common/tpl_header.php some words with if home page to display

    Do you have a link of where you are trying to do this? If on the main page, why not use the Define Pages Editor in the Tools menu to change the main page.

    Be careful using <h1> tags as ZC already uses them and you may be penalized for not using <h2> and doubling up on the <h1>.

    The main_page define does not need a div call and the spans are doing nothing.
    Code:
    <div class="clearBoth"></div>
    <h1><span>Hot Sale Brands name : </span>
    <a target="_blank" href="womens-handbags-c-11_13"/><span>Tote Handbags</span></a>
    <span>&nbsp;&nbsp;</span>
    <a target="_blank" href="womens-shoes-boots-c-16_17"/><span>Womens Shoes</span></a>
    <span>&nbsp;&nbsp;</span>
    <a target="_blank" href="womens-high-heels-c-16_17_26"/><span>High Heels</span></a>
    <span>&nbsp;&nbsp;</span>
    <a target="_blank" href="girls-sandals-c-16_17_29"/><span>Sandals</span></a></h1>
    Items in red do nothing and should be removed. Items in green are not valid references unless you have a URL rewriter I'm not familiar with. Not sure about mega menu code but I would not put it in the defined main page.
    Last edited by dbltoe; 14 Jul 2018 at 05:50 AM.

  3. #3

    Default Re: /common/tpl_header.php some words with if home page to display

    Quote Originally Posted by dbltoe View Post
    Do you have a link of where you are trying to do this? If on the main page, why not use the Define Pages Editor in the Tools menu to change the main page.

    Be careful using <h1> tags as ZC already uses them and you may be penalized for not using <h2> and doubling up on the <h1>.

    The main_page define does not need a div call and the spans are doing nothing.
    Code:
    <div class="clearBoth"></div>
    <h1><span>Hot Sale Brands name : </span>
    <a target="_blank" href="womens-handbags-c-11_13"/><span>Tote Handbags</span></a>
    <span>####</span>
    <a target="_blank" href="womens-shoes-boots-c-16_17"/><span>Womens Shoes</span></a>
    <span>####</span>
    <a target="_blank" href="womens-high-heels-c-16_17_26"/><span>High Heels</span></a>
    <span>####</span>
    <a target="_blank" href="girls-sandals-c-16_17_29"/><span>Sandals</span></a></h1>
    Items in red do nothing and should be removed. Items in green are not valid references unless you have a URL rewriter I'm not familiar with. Not sure about mega menu code but I would not put it in the defined main page.
    Thank you,i did some things and think about this is the best way.

 

 

Similar Threads

  1. New products on home page - where's the php code inside tpl_header?
    By Thannaree in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 10 Jun 2011, 11:16 AM
  2. Home page disappeared after editting tpl_header.php, please help
    By newproduct4you in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Apr 2010, 02:13 AM
  3. Home & Log in URL in tpl_header.php
    By miles in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Oct 2006, 05:32 AM
  4. tpl_header.php in template common help
    By yeaboy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 29 Jul 2006, 05:56 AM
  5. Edit tpl_header on home page only?
    By Danielle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2006, 10:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR