Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove hentry from post_class()
<?php
/**
* Remove 'hentry' from post_class()
*/
function ja_remove_hentry( $class ) {
$class = array_diff( $class, array( 'hentry' ) );
return $class;
}
add_filter( 'post_class', 'ja_remove_hentry' );
@Jawanet

This comment has been minimized.

Jawanet commented Jan 9, 2014

good brother www.alambudidaya.com

@abumalick

This comment has been minimized.

abumalick commented Sep 15, 2015

It works but if I visit my website with https, the browser hangs and don't load the page ...
I putted the script in functions.php of my theme

@Zetadisseny

This comment has been minimized.

Zetadisseny commented Aug 31, 2016

Hey Jare! Thanks for share i test in my site zetadisseny.es

@Bonjur

This comment has been minimized.

Bonjur commented Sep 14, 2016

Will removing schema trigger a Google penalty? What are the consequences? Gbwhatsapp

@benarjeeprasad

This comment has been minimized.

benarjeeprasad commented Dec 19, 2016

I'm getting the same error on my website http://redfire.in , will try the fix.

@naazg

This comment has been minimized.

naazg commented Jan 15, 2017

Hello, My website http://www.designsmag.com shows an error on hentry : missing updated but when i test live data it won't show any error. 0 error 0 warning.. what might be the issue?

@jack404404

This comment has been minimized.

jack404404 commented Jan 27, 2017

I am getting the error --page is not showing https://www.phoenix-golden.com/

@Lauyou01

This comment has been minimized.

Lauyou01 commented Feb 6, 2017

I am still getting the error on www.lauyou.com

@aafirasheikh

This comment has been minimized.

aafirasheikh commented Feb 13, 2017

i have fixed it at Software Development Company

@endurra

This comment has been minimized.

endurra commented Mar 1, 2017

@Rajeshchourasia1992

This comment has been minimized.

Rajeshchourasia1992 commented Mar 10, 2017

sir i'm not able to fix up hentry error on my website http://rajdhaniband.com

@Rajeshchourasia1992

This comment has been minimized.

Rajeshchourasia1992 commented Mar 10, 2017

sir i'm still getting hentry problem on my site http://rajdhaniband.com is it theme error

@leoventans

This comment has been minimized.

leoventans commented Mar 23, 2017

Hey, It still has some issue at SEO Company

@Chole11

This comment has been minimized.

Chole11 commented Apr 15, 2017

Cool, helped me with my escape game website

@welcomecode

This comment has been minimized.

welcomecode commented Apr 27, 2017

Sir, I am getting hentry problem only for my WordPress Tutorial site pages, I am using Voice theme.

@OtkupautomobilaBeograd

This comment has been minimized.

OtkupautomobilaBeograd commented Apr 28, 2017

Hello, i have problem with missing author and missing updated here www.optimizacijasajta.org/blog/ and when i click on check live data it is showing some other error with breadcrumb and URL is missing, i am confused, any help is most appreciated.

@cuocbong88

This comment has been minimized.

cuocbong88 commented May 22, 2017

Fixed it at M88. Thank you!

@ngabidin

This comment has been minimized.

ngabidin commented May 22, 2017

@wiggledigitalZA

This comment has been minimized.

wiggledigitalZA commented May 22, 2017

Worked for me at http://www.placemyad.co.za

@leoventans

This comment has been minimized.

leoventans commented Jun 1, 2017

Hi there, Thanks for sharing, but my site is showing the error on pages of tags, can you help me to check it?
https://seo.techroomage.com/

@trandathust

This comment has been minimized.

trandathust commented Jun 9, 2017

Hello, My website http://cakhodacsan.com shows an error on hentry : missing updated , entry, title but when i test live data it won't show any error. 0 error 0 warning.. what might be the issue?

@sdynamo

This comment has been minimized.

sdynamo commented Jun 12, 2017

Hello, thank you for the code. I was looking for a way to remove hentry from my website pages as it was irritating to see red warning sign in Google Webmaster Tools / Search Console.
The website is CityShoppingPoint a Local Business Directory & Events.
For the type of website I don't see it necessary having hentry codes. And it works flawlessly without having to use plugins.
I suppose it should be working for any themes as well.

@apk4down

This comment has been minimized.

apk4down commented Jun 21, 2017

thank you that's help me
تيوب ميت

@houman2h

This comment has been minimized.

houman2h commented Jun 27, 2017

Thank you

@houman2h

This comment has been minimized.

houman2h commented Jun 27, 2017

@chuotbumo

This comment has been minimized.

chuotbumo commented Jul 3, 2017

Thanks, it work : cắt bao quy đầu

@AlexDoughas

This comment has been minimized.

AlexDoughas commented Sep 6, 2017

I'm also getting the same issue on my website- https://www.bxcel.net :(

@LazarinaEvlogieva

This comment has been minimized.

LazarinaEvlogieva commented Sep 11, 2017

Thanks a lot! I tried it with my site https://astoria-academy.com - and it works perfect!

@Jinnhere

This comment has been minimized.

Jinnhere commented Sep 25, 2017

Thanks for share i test in my site BlogItUpp.

@emergency82

This comment has been minimized.

emergency82 commented Sep 27, 2017

Hello there,
Seriously, please help me!
htttp://www.istanbulcamfilmcisi.net
error-image

@estudio-27

This comment has been minimized.

estudio-27 commented Sep 30, 2017

Una solución que no funcionará en todos los Themes. Recomiendo contactar directamente con el desarrollador del Theme. Saludos desde nuestra empresa de Diseño web en Asturias.

@dylandang555

This comment has been minimized.

dylandang555 commented Oct 5, 2017

this is my website http://dagaantien123.com . I try use the code but cannot solve the problem . I add the code into function.php after that my web has error 500 ... make me so confused

image

@rojgarspot

This comment has been minimized.

rojgarspot commented Oct 10, 2017

I'm getting the same error on my website
http://www.rojgarspot.com/jobs-blog/

@ek3292

This comment has been minimized.

ek3292 commented Oct 14, 2017

I'm getting the errors of missing update and author hatom Structured Data > hatom (markup: microformats.org) for my website

https://www.wonderslist.com

, But while testing onStructured Data Testing tool everything looks good.

Is it ok to remove the hentry/hatom (markup: microformats.org), because Moz says remove the hentry because it’s not needed?

Can we use both microformats.org and schema.org at same time?

@kanth510

This comment has been minimized.

kanth510 commented Oct 31, 2017

sir i am facing the schema markup errors my website http://www.esarkari.co.in how to fix it php site

@tejascool

This comment has been minimized.

tejascool commented Nov 3, 2017

thank you for the fix my website is now good. this is my site - https://celebscurry.com

@inblogslife

This comment has been minimized.

inblogslife commented Nov 10, 2017

i have completed all tags and my theme already have class=fn but half of my pages has author and updated error.
Inblogslife

@Myasti

This comment has been minimized.

Myasti commented Nov 17, 2017

I come here to find out the answer for error type (Missing: author) without removing wordpress code. But I think will consider this solution if there is no other way - My24

@sairamswamy

This comment has been minimized.

sairamswamy commented Nov 27, 2017

I'm getting the same error on my website Telugu blog

@emergency82

This comment has been minimized.

emergency82 commented Dec 5, 2017

@alagandula

This comment has been minimized.

alagandula commented Dec 6, 2017

I have changed the author name in myprofile and got error in structured data

http://tutorialsdepot.com

But while testing onStructured Live Data Testing tool everything looks good.

https://search.google.com/structured-data/testing-tool/u/0/#url=http%3A%2F%2Ftutorialsdepot.com%2F

@daniushko

This comment has been minimized.

daniushko commented Jan 2, 2018

I can't find the author in my single.php file. I'm using the ThemeForest's photography theme. Can anyone help?
https://swansphotography.com/

@bet-bg

This comment has been minimized.

bet-bg commented Jan 4, 2018

Hi I have tested this on https://bet-bg.com/bet365/ and works fine. Thanks for sharing!

@apktopsblog

This comment has been minimized.

apktopsblog commented Jan 22, 2018

thank you
very useful www.apktops.ir

@internop

This comment has been minimized.

internop commented Jan 23, 2018

Thanks you.
Tested this on gifts for your lover .

@g-ads

This comment has been minimized.

g-ads commented Feb 5, 2018

Thanks for share.
we solved it on تبلیغات گوگل با جی ادز

@kresnabudi

This comment has been minimized.

kresnabudi commented Feb 8, 2018

thanks share solved for insa.or.id

@Technogeekblog

This comment has been minimized.

Technogeekblog commented Feb 11, 2018

This code worked for my Techno geek blog. thanks a ton

@Paulnwachukwu

This comment has been minimized.

Paulnwachukwu commented Feb 14, 2018

Thanks a lot worked for me on. BloggerSpy

@Byham2012

This comment has been minimized.

Byham2012 commented Feb 20, 2018

With my website https://wanauswebdesign.com.au I used this plugin https://www.acceleratormarketing.com/fix-structured-data-errors/
I think I paid about $15.00. It works on most things except for posts.
If I use this code in a child theme and remove the plugin maybe?

@pyaga

This comment has been minimized.

pyaga commented Mar 23, 2018

nice information thanks a lot is that work for me ? where have to add this code in function.php
www.pyaga.com

@jamiel-sharief

This comment has been minimized.

jamiel-sharief commented May 4, 2018

Hey, having the same issue at cold email software blog, will try this.

@gaikwadamolas

This comment has been minimized.

gaikwadamolas commented May 7, 2018

Thanks for share i test in my site http://www.knowteck.com/

@asdsesdee

This comment has been minimized.

asdsesdee commented May 10, 2018

i see 7 hentry error on my website .. but on live test is no error is show on live test
why ???
help me sir

@eossingapore

This comment has been minimized.

eossingapore commented May 26, 2018

I have tried this on my website https://www.escortsofsingapore.com.sg and it hasn't worked.

@rotipisju

This comment has been minimized.

rotipisju commented Jun 10, 2018

i have any error on my website Viagra asli and my second website in Jual viagra in my web on Obat kuat viagra

@jeparamedia

This comment has been minimized.

jeparamedia commented Jun 28, 2018

where to put this code ( i have child theme) on my site? Karimunjawa tourism
i want to remove from my page, here: paket karimunjawa
thanks in advance.

@wikiroid

This comment has been minimized.

wikiroid commented Jun 29, 2018

I have the same problem, but with missing update and FN, and i contacted my developer and they say that's everything's ok and that i must contact YOAST because the problem is because of you guys, so what can i do?? My web page is http://wikiroid.net

@planetlaguaz

This comment has been minimized.

planetlaguaz commented Aug 5, 2018

I have tried this on my website https://www.planetlaguaz.net/ and it hasn't worked.

@andpiazza

This comment has been minimized.

andpiazza commented Aug 20, 2018

Reason why this code does NOT work is: it removes hentries from posts, when in reality it needs to remove from pages, categories and tags.
If anything, removing hentries from posts might HURT your SEO results: hentries are designed to capture articles' meta data so that's exactly where you want it to show.

I posted here code that does removes hentries from pages categories and tags: https://github.com/andpiazza/remove_hentry_wordpress

@softimuscu

This comment has been minimized.

softimuscu commented Aug 31, 2018

The @andpiazza solution works for me:

https://github.com/andpiazza/remove_hentry_wordpress

Thank so much... 5 star !!!

@compresource

This comment has been minimized.

compresource commented Sep 7, 2018

I'm having similar problems with https://www.permanentnursingjobs.com

Theres no clear post above which states which is the best solution without hurting SEO results

@joshin16

This comment has been minimized.

joshin16 commented Sep 20, 2018

Hello, i m also getting the same Hentry errors & ERROR: https://schema.org/Website type unknown for the specification schema.org for my site
https://www.wiki.meramaal.com/
Unable to fix it. Please help

@houman2h

This comment has been minimized.

houman2h commented Sep 20, 2018

@ardyfeb

This comment has been minimized.

ardyfeb commented Oct 9, 2018

@hjafarik

This comment has been minimized.

hjafarik commented Oct 25, 2018

work for me

@DownloaSoft

This comment has been minimized.

DownloaSoft commented Oct 31, 2018

Thanks, its work perfect in my site https://download.lightbook.org/en/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment