Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Remove category heading

    On my category main page, I have a H1 heading that I want to remove. The id is "indexCategoriesHeading"

    Developers Toolkit found it in:

    /includes/templates/barebones/templates/tpl_index_categories.php
    Line #17 : <h1 id="indexCategoriesHeading"><?php echo HEADING_TITLE; ?></h1>
    Line #43 : <h1 id="indexCategoriesHeading"><?php echo $breadcrumb->last(); ?></h1>

    Must I remove Line #17 or only the echo piece?
    I want to keep the breadcrumbs.

    The same also exists in /includes/templates/template_default/templates/tpl_index_categories.php but I think I must not worry about this because I am using Barebones - is that correct?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Remove category heading

    Better not to tamper with code in template files...

    Easiest is to put this at the bottom of stylesheet.css

    h3#categoriesHeading {display:none;}
    20 years a Zencart User

  3. #3
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Remove category heading

    Schoolboy,
    Thank you for your quick response but I am not sure I fully understand your reply.

    The id I refer to is indexCategoriesHeading and it is H1. I think h3#categoriesHeading is something different.

    However, your suggestion did point me in the right direction.

    In CSS, I found
    #indexCategoriesHeading, #productName {text-align:center;} and added display:none; to it. It worked.

    thank you
    Ivanna

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Remove category heading

    Quote Originally Posted by Ivanna View Post

    In CSS, I found
    #indexCategoriesHeading, #productName {text-align:center;} and added display:none; to it. It worked.

    thank you
    Ivanna
    This will ALSO HIDE your Product Name... (#productName is also being declared "display:none" in the above...)

    #indexCategoriesHeading {display: none}

    Just add this to the bottom of your stylesheet
    20 years a Zencart User

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Remove category heading

    At the risk of disagreeing with my friend schoolboy, I would (and have) just delete the line #17 you referenced and, of course, save the edited file to your override folder.

    I don't know how removing the <h1> tag on that page may affect SEO.

  6. #6
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Remove category heading

    Hello schoolboy,
    I did as you suggested and removed my edit and added your suggestion h3#categoriesHeading {display:none;} but it did not work. I am not clear with h3 instead of h1 and categoriesHeading instead of indexCategoriesHeading
    Because this did not work, I add a new line #indexCategoriesHeading {display:none;} which worked.

    Hello Steve,
    I did delete line 17 in /includes/templates/barebones/templates/tpl_index_categories.php but it did not change anything.

    I also worried about SEO. I have another h2 title that I added to my text but would like it to be h1. Also, I would like to add #indexCategoriesHeading into my text area, that way I am sure of SEO. Do you understand what I mean?

    this is a link to the page I am working
    http://74.52.59.198/~mpbsw/catalog/i...index&cPath=66

    thank you both
    Ivanna

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Remove category heading

    Quote Originally Posted by stevesh View Post
    At the risk of disagreeing with my friend schoolboy, I would (and have) just delete the line #17 you referenced and, of course, save the edited file to your override folder.

    I don't know how removing the <h1> tag on that page may affect SEO.
    The edit can be done either by changing the TPL file, or by a css declaration. Both have the same "effect" - hiding the header, but there are anciliary issues with this and Steve alludes to one of the more important... the purpose of H1 in SEO...

    Using CSS will keep the heading in the underlying HTML, so it will be VISIBLE to search engines... BUT... Google will also take note of any declarations in the stylesheet designed to hide an element... So while the HTML will contain the H1 and its associated text, the css will prevent it from showing. Google COULD regard this as "cloaking" which it frowns upon.

    If you edit the TPL file (remove the heading completely), then you have a page with no definitive H1 tag - and in ZC, that particular H1 will also feature in the <title> and possibly the <description> tags. So you could diminish your page ranking potential for that omission...
    20 years a Zencart User

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,268
    Plugin Contributions
    3

    Default Re: Remove category heading

    There should only ever be ONE H1 tag on a "page". Google regards additional H1 tags as "stuffing" - (over-doing it).

    Zencart takes these into account when the code assembles a page, and is extremely good at compiling a really neat bunch of HTML that search engines like.

    OK... so there's much more to SEO of course, such as content richness, relevance, hyperlining logic and hierarchy, etc...

    But TECHNICALLY you should not really tamper with Zc core behaviour, because it constructs the HTML for any given page that is TECHNICALLY good for SEO.

    Unless you have a really compelling reason to alter this behaviour (and I can't think of one), then just let the page get built as it is intended.

    If the SIZE of that H1 is not to your liking, then change it in the css...

    But I would leave the core architecture alone in cases where HTML composition is important for SEO reasons.
    20 years a Zencart User

  9. #9
    Join Date
    Jan 2011
    Location
    Texas, USA
    Posts
    171
    Plugin Contributions
    0

    Default Re: Remove category heading

    Schoolboy,
    thank you for that explanation.I understand SEO (my boss drums it into me. he is English also. lol)

    I was trying to change the aesthetics of the page. The heading is always to the top when I want it to the side of an image (see my previous link)

    I am sorry, I do not say things very well.

    In the Admin area, I go to the category/Products Top and edit the category page from there. I use the html part, not wysiwyg. In there I have put my h2 and text. What I would like to know, is it possible to put #indexCategoriesHeading in there instead of the h2 heading? This way, I am sure of the SEO for title and heading etc.

    If this is possible, then I must rely on your expert advice to help me do this.

    thank you for your support
    Ivanna

  10. #10
    Join Date
    Sep 2012
    Location
    West Jefferson, NC
    Posts
    391
    Plugin Contributions
    0

    Default Re: Remove category heading

    Quote Originally Posted by schoolboy View Post
    There should only ever be ONE H1 tag on a "page". Google regards additional H1 tags as "stuffing" - (over-doing it).

    Zencart takes these into account when the code assembles a page, and is extremely good at compiling a really neat bunch of HTML that search engines like.

    OK... so there's much more to SEO of course, such as content richness, relevance, hyperlining logic and hierarchy, etc...

    But TECHNICALLY you should not really tamper with Zc core behaviour, because it constructs the HTML for any given page that is TECHNICALLY good for SEO.

    Unless you have a really compelling reason to alter this behaviour (and I can't think of one), then just let the page get built as it is intended.

    If the SIZE of that H1 is not to your liking, then change it in the css...

    But I would leave the core architecture alone in cases where HTML composition is important for SEO reasons.
    What effect would adding social media tools, like facebook and twitter, to the right of the H1 category have on SEO?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Remove Category Heading/Image from Main page
    By Wildthing in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 23 Apr 2010, 01:12 AM
  2. Remove white space between product listing and category heading
    By Yiannis in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Jan 2010, 01:23 PM
  3. Category Heading - can't remove w/drop downs
    By Terry111 in forum Basic Configuration
    Replies: 3
    Last Post: 20 Sep 2008, 09:46 PM

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