HI
Do you want to remove this metas from custom post types: http://screencast.com/t/6ZrEkhYDT5Fo If so you can use this condition in td_module_single_base.php file: http://screencast.com/t/ExIjUhXVxMMH
if (get_post_type() != 'post'){
return;
}
Hope this helps!
Thanks!
Hi, it removes the data, but the markup is still there. So when I test with google structured data testing tool, it is giving me errors and warnings.
URL for you to test: http://www.lilkuya.com/job/hr-officer-for-compensation-benefits/
Qn: is there any way not to have any markup on CPT? I just want the markup on ‘post’
-
This reply was modified 9 years by
rootheng.
Hello,
If you want to remove any markup from custom post types, you will have to add this condition like so:
if (get_post_type()!='post'){
return '';
}
in this file : http://screencast.com/t/H2GDeU7Tm
It will add a check in the code making the metas to not show on anything other than posts.
Thank you!
Hi, I already added:
Please see: http://www.screencast.com/t/ojEteGKBH
But this is what the google structured data testing tool picked up:
<article id=”post-590″ class=”post-590 job_listing type-job_listing status-publish has-post-thumbnail hentry post” itemscope itemtype=”http://schema.org/Article”>
Showing it is markup as Article and returning errors.
Error showing: http://www.screencast.com/t/uFThcC172Pn
Well google is looking for an author, a publish date, a headline, a featured image. These things should be present on all custom post types. Please test out our books custom post type and see if the errors are still there and see if the markup is added for it. If you remove the markup, the errors on google won;t go away as it will still see the CPT and provide errors because the markup is missing. The errors are about missing markup not about metas that are already there.
Thank you!
Hi, I think maybe you don’t understand my question.
If you do not define the type, then there will not be any error. I already mark it as JobPosting, so it already has microdata type as JobPosting. I do not need another type as Article.
As previously mentioned, this is what Google picked up:
<article id=”post-590″ class=”post-590 job_listing type-job_listing status-publish has-post-thumbnail hentry post” itemscope itemtype=”http://schema.org/Article”>
Please see this: http://www.screencast.com/t/EHAWL7cLcqt
What I want:
<article id=”post-590″ class=”post-590 job_listing type-job_listing status-publish has-post-thumbnail hentry post” itemscope itemtype=”http://schema.org/Article”>
Please see this: http://www.screencast.com/t/l3lMhIdDAsRY
Is this possible?
-
This reply was modified 9 years by
rootheng.
Please see the screenshot for the theme twenty fifteen: http://www.screencast.com/t/u44Sr3BHZ
There is no more Article markup. So it should be coming from the theme instead of WordPress.
Thank you for your assistance.
By the way, once I changed back, the markup came back again.
-
This reply was modified 9 years by
rootheng.
Hi,
I think i get it now Please try it like so:
http://screencast.com/t/JAmcaNWan41
result: http://screencast.com/t/fql5ztHP
Thank you!