0
Welcome Guest! Login
0 items Join Now

The problem in Joomla is article titles are usually set up as <h2>

    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 3 weeks ago
    • 1. I was reading about doing an override as pasted below however i saw the warning in this article about template club conflicts and need to know if this is the best practice for me?
      I am using Joomla 3 and the Isotope template


      Use a template override
      Usually, template overrides are for more advanced users, but this is probably the simplest template override that exists. Especially in Joomla 3, creating template overrides has become extremely easy:
      Go to Extensions > Template Manager > Templates and select the current template. Then go to the Create Overrides tab, click on com_content (hidden options are now shown) and click on Article. A code-editor window opens up. Now look for the following section around line 28:
      <div class="page-header"> <h2> <?php echo $this->escape($this->params->get('page_heading')); ?> </h2></div>
      You will notice the <h2> tag. If you replace the opening and closing tag with an <h1> your titles will be shown correctly.

      Note that this procedure may not work in all templates, as some template clubs maintain their own overrides, which may conflict with this procedure.
      h1 and h2
      2. I want to improve my seo with keywords using h1 and h2 tags in my articles however they look way too big and obvious.
      Is there any way of making these lok smaller or seamless or not very different from the rest of the text in the article?

      Thank you
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 3 weeks ago
    • You should normally only have one H1 tag on a page. It is for this reason that all article and module title are H2 (because more than one can appear on the same page). The H1 tag is actually associated with the "page heading" field on the menu item (because there can only be one on a page).

      So, my opinion is that you should not be creating zillions of overrides to change everywhere an H2 tag is used to be an H1 tag. You will create yourself a maintenance nightmare by doing such a thing.

      In J3.x Joomla intoduced new parameter where you could change the tag used for titles. However this functionality only works on Joomla's own templates (it does not work with RT templates).


      Having read all the above, if you decide that you still want to do this then you can easily change the sstyle of the H1 tag to make the text smaller with some custom CSS.

      Regards, Mark.
    • Last Edit: 6 years 2 weeks ago by MrT.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 3 weeks ago
    • Thank you !

      I decided to take your adivce.

      I pasted the link to the page I am working on in the secure tab

      I need to apply a unique h2 tag so that I dont change the original h2 tag globally across the site and in my case because I dont want the reader to visibly see any difference in the text I mark with h2 tags.

      Heres is what i tried but it does not work because I cant apply a unique class to the h2 tag inside an article or I dont know how to.

      I created a line in my override custom.scss
      .seo h2 {
          display: block;
          font-size: 14px;
          line-height: 26px;
          -webkit-margin-after: 0.83em;
          -webkit-margin-start: 0px;
          -webkit-margin-end: 0px;
          font-weight: bold;
          color: #333;
      }

      Then I marked the paragraph with the new css class .seo that did nothing so I added a div and applied the class to the div.
      I first tried by adding the class to the div like below and then adding the h2 tag to the text I wanted
      <div itemprop="articleBody">
      <div class="seo"><p><img style="float: left; margin: 5px 10px 0px 0px;" title="How to Make a #Homeschool Transcript @TheHomeScholar" src="https://s3-us-west-2.amazonaws.com/hhhimages/How-to-Make-a-Homeschool-Transcript_square550.png" alt="high school transcript, how to get your high school transcript" width="350" height="350" border="0"> <strong style="color: #e52061;">May 2016</strong><br> <strong style="color: #e52061;">By Lee Binz</strong><br> <strong style="color: #e52061;">The HomeScholar</strong></p>
      <p style="text-align: justify;">If you ask a typical homeschool parent what was the scariest thing about homeschooling high school, I bet you’d find high school transcripts somewhere near the top of their list. I want to remove your fear of </p><h2>high school transcripts!</h2> Cue the “Mission Impossible” theme music now!<p></p>
      <p style="text-align: justify;"><span style="color: #e52061; font-size: 14pt; font-weight: bold;">Translate Your Homeschool Experience</span><br>First, you need to know that grades and credits are the love languages of colleges.&nbsp;Colleges need to understand your child’s homeschool experience, and they need words and numbers. Your job as a homeschool parent is to take your normal and natural homeschool experience and translate it into words and numbers colleges understand. Don’t change the way you homeschool as long as it’s working. Instead, translate what you’re already doing into the language of college grades and credits, so they will understand and appreciate what you’ve done.<a class="button" href="/how-to-make-a-homeschool-transcript-page2">  Read more</a> 	</p></div></div>

      However if you look at the screencap it created a return and therefore shows a huge space before and after the text "high school transcripts!"
      gyazo.com/20f18b211757071b03f73d68d8aa7343

      The reason is for some reason Joomla or the editor I am using is creating a <p> tag before and after the h2 tag

      How do I get the editor, I am using the non wysiwig editor Rok, to stop adding the paragraph tag and how do I apply a unique h2 tag to the text I want?

      Thank you
    • Last Edit: 6 years 2 weeks ago by MrT.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 2 weeks ago
    • Ok I see a lot of words but not really anything that truly helps me understand what you are trying to do or for what purpose.

      If you want to use a H2 on your own text and style it as you want then the html is:
      <h2 class="myheading">You text goes here</h2>

      and the CSS:
      .myheading {
      
      }


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 2 weeks ago
    • Yes its difficult to see unless you look at the code.
      However my h2 tag is applied to the text "high school transcripts!" in the sample above. Notice the additional <p></p> added below it?

      The problem with that is it adds a paragraph <p> tag as well when I apply it. And that creates a space.

      My whole idea or my main reason for doing this is I want to gain the SEO credit from Google but I dont want this to look different than the rest of the text or ruin the layout.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 2 weeks ago
    • Please would you post your URL, superuser id and pswd in the secure tab of your post and I'll have a look for you.

      I still don't get it but let me look at the article...

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 2 weeks ago
    • Sure I have not edited this article yet because its live I was just demonstrating what I did using the inspect tool in chrome.


      I dont mind you looking at the article itself but please dont edit it on the live site and publish it.

      I think I have figured it out finally.
      I cant and should not modify the look of h2 tags because that would change the look for all h2 tags site wide.
      I should if I want to gain higher seo rank place the keywords in the h1 and h2 tags inside the article only for headlines and sub headlines.
      So obviously they get more weight from Google and I should design my article to have more of those.
      Next to gain more weight or value from google place the keywords several time in the content normally and naturally without stuffing the article making it read and look ridiculous.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: The problem in Joomla is article titles are usually set up as <h2>

    Posted 6 years 2 weeks ago
    • No point in me looking then - you said something was adding an extra paragraph tag - and I though t you said it was your editor. If I can't edit it then I can't test that. Also, if you only change it in the firefox inspector not sure how that could be an editor anyway.

      Also, you still should never have more than one H1 tag on a page, if you start spraying your pages with h1 tags then you will have the opposite effect you intend - google will most probably penalise you for doing that.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.052 seconds