Home › Forums › WoodMart support forum › Pages marked with HTML
Pages marked with HTML
- This topic has 5 replies, 3 voices, and was last updated 1 year, 5 months ago by
Bogdan Donovan.
-
AuthorPosts
-
November 6, 2023 at 4:23 pm #510239
ThomasParticipantHi,
Today i’ve tested some pages in the Structured data (Schema.org) testing tool. Somehow @type hentry came up on all normal pages of my website. This is appareantly an old way to add structured data via CSS. I’ve did some research and found out that the css class ‘hentry’ is within the page. This also brought up that my homepage and other pages content is wrapped around the <article> html tag, which is very weird. I’ve switched my theme to see if it was Woodmart doing this, and indeed it is. Other themes don’t do this and i’ve checked multiple websites that are using Woodmart, and they all have this.
<article> html is used for blog posts, news articles etc, not to wrap the whole page in. I don’t like this and would like to hear from you why you are using this to wrap page content? And how i can change it so the page content is not wrapped in the <article> HTML?
Apart from that i would also like to know your opinion on the ‘hentry’ css class that is added to the <article> HTML?
Thanks in advance and hopefully you have a solution for this as i think this wrong HTML usage of <article> does negatively impact my websites SEO.
Thomas
November 7, 2023 at 10:19 am #510424
Luke NielsenKeymasterHello,
In this case, is there any chance that you could give me access to the dashboard area so I can have a look at the settings on your website, please?
Also, confirm the permission for plugins deactivation, and switching to the parent/default theme. As soon as we complete the testing we will enable it all back, You would better make the full backup of your site.
Kind Regards
November 7, 2023 at 8:58 pm #510643
ThomasParticipantHi Luke,
I can give you access to the same website on our german domain that doesn’t get indexed (it contains the same theme version, plugins etc.) (see private section for login).
You have permission to deactivate plugins and switch to the parent theme, actually i’ve already did all this before making a post on this forum. As i said before i’ve checked other websites running Woodmart and they all have the same <article> usage on for example the homepage. This is just how the theme is built but i’m very curious if you can ask for an explanation of the developers, why this is? As this isn’t normally the way to use this HTML markup.
Looking forward to your reply.
Thomas
November 8, 2023 at 11:38 am #510769
Bogdan DonovanKeymasterHi,
To maximize plugin compatibility, our theme page template structure was inherited from the default WooCommerce theme “Storefront” and non-WordPress full-site editing themes such “Twenty Twenty-One”. Both of them have article tag in their page template.
“Storefront” – https://prnt.sc/I_KiqGO_4_ck
“Twenty Twenty-One” – https://prnt.sc/ZlGuH7_WHhztIf you want to change this structure, you can do it using child theme, by moving file page.php from parent theme inside child theme and modifying strings 23 and 34 (screenshot https://monosnap.com/file/qdYbOQieOHQJpiQQcq0vm36dj8dILd).
Kind Regards
November 8, 2023 at 12:14 pm #510785
ThomasParticipantHi Bogdan,
Thanks for your reply, very helpful. Couple of questions left:
1. What is your opinion on the usage of <article> for all pages using the page.php template? As mentioned before i don’t see other WordPress themes do this often.
2. I have experience with editing PHP files and working with a child theme. Before i edit it, do you think functionality’s or pages will break when i move the ‘entry-content’ div outside the <article> div and then remove the <article> div?
Thanks in advance.
November 8, 2023 at 1:35 pm #510815
Bogdan DonovanKeymaster1. As a WooCommerce theme, WoodMart inherits page structure from the official WooCommerce “Storefront” which serves as a benchmark for WooCommerce itself, page builders, and other plugin developers. In a previous time before the widespread active use of page builders, “page” post type was commonly used to create simple static text content that is separated from the blog post loop with the possibility to enable a sidebar and discussion feature
that are shown in the screenshot (https://prnt.sc/ajVVnZTXoFxj).Nowadays, such use of pages as text articles is quite rare, and mainly page content is created on third-party builders or build-it WordPress “Gutenberg” builder, but since this structure is present in WooCommerce official theme it will stay in our theme too. It also can be changed in the future if WooCommerce changes its page template in a theme update, which they often do after a main plugin update.
2. We cannot evaluate all the consequences of removing this block, but visually it should not affect the appearance of the page, unless they are somehow used in clients customizations or third-party plugins.
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register