• Resolved wpjetusr2244

    (@wpjetusr2244)


    Hello,

    I am making changes to the look of the site title link “<a>” in the desktop header, but I was surprised to see that the CSS selector for the a link of the site title in the header is different on the home page and other pages and blogs! Why there is such difference for the exactly the same part of the webpages? In one case the last part of the selector is p > a and for the other case it is span > a?

    This makes customization unnecessary dificult for users of the Astra theme.

    This is not a support question, but it will be very good if things be made more user-friendly, even in the backend. The KISS principle, you know. Maybe for Astra Theme 4.0.0?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @wpjetusr2244,

    We intentionally made it that way, to avoid “more than H1 on the page” issue. You know, people believe that having more than H1 on a page is bad for SEO.

    Please allow me to explain.

    On the Frontpage and Blog post page, the Site Title will have H1 tag, because on the frontpage, it’s common the Page Title is hid. And on the Blog post page, with Astra theme, there will be no Page Title. The Post Titles on the Blog post page, by default, the tag is H2. If the Site Title’s tag is not H1, then these pages will have issue related to SEO. “The page has no H1“.

    I believe it becomes clearer now. However, please allow me to continue.

    On the other pages, the tag for the Site Title is span, because the Page Title will have H1 tag. If the Site Title’s is H1, then the “more than H1” issue as I mentioned above will arise.

    I hope that clarifies and clears any confusion you may have.

    Let us know if you need any assistance, otherwise please mark the topic as Resolved.

    Kind regards,
    Herman ??

    Thread Starter wpjetusr2244

    (@wpjetusr2244)

    I understand the SEO problem with more than one H1 tag per webpage. But I wonder if it is possible to use another solution to the problem.

    For example, Site Title to use <p>, <span> or <div> tags on every page of the site, and the page title to use H1 tag on every page. The page title could be hidden with CSS on pages where the user want not to show it, but it will stay in the html code. I don’t know how this looks like from SEO point of view.

    In this way, the header is the same and the H1 tag is exactly one on every page. In other words, not to remove entirely page title and moving the H1 tag to the header, but hiding the page title where it is not needed.

    Hi @wpjetusr2244, sorry for the long delay.

    For example, Site Title <p>, <span> , or <div> to use, or tags on every page of the site, and the page title to use H1 tag on every page.

    Yes, the Site Title is <span> on all pages but the Frontpage and Blog post page, as I explained in my previous response.

    The page title could be hidden with CSS on pages where the user want not to show it, but it will stay in the html code. I don’t know how this looks like from SEO point of view.

    There’s an option to hide the Page/Post Title on Astra, and the Page/Post Title markup will not appear in the code.

    Please let me know if you still have any doubts.

    Kind regards,
    Herman ??

    Thread Starter wpjetusr2244

    (@wpjetusr2244)

    Hello again!

    I had the time to look at this question again. I have to say that I agree with you about the SEO requirements for proper page headings. My point of view is that there is another way of solving this inconvenience with styling the Site Title element on different web pages.

    When the user decides to hide the page title, it is completely removed from the HTML code and not just hidden with CSS (display:none) for example. In this case (hiding with CSS) the H1 element is in the code and this is OK for the SEO. I used the online SEO checker smallseotools.com. This is not the only one, of course, and maybe not the best one. This tool do not find a problem when the single H1 tag is hidden. When the H1 tag is removed, the problem is shown in the results.

    For this tests I used the following 2 URLs, they are just several rows of HTML tags:

    In this way, the Site Title can have the same tag on every web page regardless of the its type. The problem with the Blog Posts page can be solved by adding hidden H1 in the page body, and the custom text can be set by the user, for this special page. Also, there will not be necessary to create a H1 tag somewhere else.

    What will say about this version?

    Hi @wpjetusr2244,

    We believe that, for common users, who know nothing about CSS and techie stuff, what we have done is the best “solution”. Further, I believe that the Headings are not just for SEO purposes. They exist, mainly, to make an article/post more human-readable.

    Having said that, IMO, having a Heading in an article but hide it from the users/readers, it’s no use and doesn’t help the readers. When we create an article, we should be more “readers oriented” rather than “search engine oriented”. In simple words, when an article is well structured, people will like it and so does the search engine. I believe search engines are smarter than we think.

    Anyway, just in case you are not aware, it is possible with Astra to change the HTML tag of both Site Title and Site Tagline. Here is the doc for that.

    Kind regards,
    Herman ??

    Thread Starter wpjetusr2244

    (@wpjetusr2244)

    I am not HTML & CSS guru, but I have good idea about this question. Do not think that everybody asking questions here have no idea about SEO, HTML or PHP coding. The gurus don’t ask questions, they make changes they want {:->)

    Also, you can explain in simple words why my version is not better then existing version. I know and understand well the difference between SEO algorithms and normal humans. We can discuss this question till the end of time.

    OK, I am closing this topic.

    Hi @wpjetusr2244, sorry for the delay.

    It seems your knowledge about SEO is way better than mine, I would say. And TBH, I always find SEO is something that is deeper than an ocean ??

    Apart from that, I think, it was me who can’t understand your query correctly. When you said

    Also, you can explain in simple words why my version is not better then existing version.

    It made me realize that I missed when you said

    What will say about this version?

    in your response above, and I also wondered, what did you mean with this version and my version.

    If you are still interested, please let me know a bit more about your concern. Maybe, I can provide you with a better answer.

    Kind regards,
    Herman ??

    Thread Starter wpjetusr2244

    (@wpjetusr2244)

    I agree with you that the SEO algorithms and website ranking is too complex for humans. But the website ranking is done by computer software, not humans and we can not influence on ALL things that the software takes into account. And in my opinion, this is not needed. But, let’s continue with the important question.

    I have not tried yet the new 4.0 version of the Astra theme, because I am waiting the serious bugs to be fixed, so I have in mind 3.9 version of the theme.

    The solution with adding theme filter to change the tag of the Site Title area is also making things more complex, so it is not good for me. Instead I would use 2 CSS styles to solve my problem.

    Under “existing version” I mean the solution in the Astra theme, which use different HTML tags for the Site Title, depending on the page type. Under “my version” I mean the case when the Site Title use the same HTML tag on every page type.

    For example, the Blog page normally do not have title, so the existing version (Astra theme 3.9) puts H1 tag on Site Title area.

    In my version a hidden H1 tag is put in the beginning of the page, so the requirement for a single H1 tag is fulfilled. The Site Title area is always DIV tag, for example. Also, in my version, there is option the user to set a custom title for the Blog page, instead of using the general site title. The Blog page can be named something like “The Blog of …”, “Archive of …”, “Articles of …” or completelly different string. I think that the idea is not so bad?

    What do you think?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Different CSS selectors for site title’ is closed to new replies.