-
AuthorPosts
-
August 11, 2021 at 3:13 pm #1316276
Hi!
I’m making a webpage including products and want to have an accordion in the short description for every product. I therefore added one by pressing “Insert Theme Shortcode” in the short descritionbox –> Content Module –> Accordion.This works well, BUT, the HTML-code keeps showing up in the “visual box” and not only in the “text box” in the short description. It looks good on the webpage but when searching for the product on the webpage the result includes the HTML accordion code, and will also be shown in google when I make the webpage live. How is it possible to add an accordion to the short description without the code showing?
Br
August 13, 2021 at 8:16 am #1316558Hey Hejanni,
Thank you for the inquiry.
Where can we see the issue? Please post the site URL in the private field so that we could inspect the elements. Did you set the posts to display all content instead of the excerpt?
Best regards,
IsmaelAugust 13, 2021 at 8:59 am #1316561Hi Ismael!
See link in private content.
On the front end it looks good. And when searching for the product on the webpage I’ve removed the short description text to be shown (but before I removed it by adding the code below:main.template-search .entry-content { display: none; }
…it was shown.
But the problem still remains and the code is showing in meta description and will be shown when googling the product. Posted a picture in private content where you can see how it looks in the “visual box”.
(Kort produktbeskrivning stands for Short description)
Thank you!
BrAugust 16, 2021 at 3:43 am #1316840Hi,
Thank you for the info.
Are you expecting the accordion to actually display the Visual editor instead of the shortcode? That is not how it works. The shortcode will only render in the front end and it will not show in the search results.
Best regards,
IsmaelAugust 16, 2021 at 9:15 am #1316918Hi!
Yes, thought the accordion would show in the Visual editor, thanks for clarifying.
Please see private content. As you can see it says that the code will show, but it won’t?Br
August 17, 2021 at 4:38 am #1317036Hi,
Thank you for the update.
Did you add the shortcode in the Description field manually? You should remove it there because search engines will just render them as static text, not as shortcodes or not as an actual accordion.
Best regards,
IsmaelAugust 17, 2021 at 8:44 am #1317116Hi!
Okay, but how do I add an accordion to the Short Description then without the search engines render them as static text?
I want to have an accordion to every product I have, and they should have different content depending on the product.Br
August 18, 2021 at 8:02 am #1317294Hi,
Are you trying to show an accordion in the search results page? That is not possible, unless search engines actually support the feature. Only the elements that are listed in this article can be shown in the search results page.
// https://yoast.com/elements-of-the-google-search-result-page/
The accordion under the “People also ask” section is automatically generated by Google. You cannot directly control it.
Best regards,
IsmaelAugust 18, 2021 at 8:26 am #1317299Hi!
Thank you! Im aware of that, but my question is: If I choose to have an accordion in the short discription box (I add it manually) is there any way I can make sure the code won’t show in search engines?I need an accordion there (that includes different text for each product)..
Thank you again for helping me!
BrAugust 19, 2021 at 5:56 am #1317428Hi,
Please provide a screenshot of the layout that you are trying to create, and a direct link to the page where the accordion should be displayed.
is there any way I can make sure the code won’t show in search engines?
Everything in the short description field will be included in the search results. Unfortunately, shortcodes will not render correctly and will only display as static text.
Best regards,
IsmaelAugust 19, 2021 at 8:40 am #1317450Hi!
Please provide a screenshot of the layout that you are trying to create, and a direct link to the page where the accordion should be displayed.
I’ve managed to get the look I want front-end (see link in private content).
What I’m concered about is if it will effect my SEO-ranking since the HTML-code is showing in search result.Everything in the short description field will be included in the search results. Unfortunately, shortcodes will not render correctly and will only display as static text.
I’ve now managed to move the accordion to the “Long description”-box instead of the “Short description”-box (see link in private content) (I removed the woocommerce tabs). Will the info in the “Long description box” be included in the search results?
Br
August 20, 2021 at 12:19 pm #1317618Hi,
Have you tried installing an SEO plugin like Yoast instead of relying on the default content or description fields? You should be able to define the meta description separately and other meta info using the fields provided by the SEO plugin.
// https://yoast.com/features/meta-descriptions/
The page or product description is extracted from the excerpt or the product content by default, so everything that is in the short description field will be included in the search results page.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.