Create a gist now

Instantly share code, notes, and snippets.

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.

Show comment Hide comment
@Jawanet

Jawanet Jan 9, 2014

good brother www.alambudidaya.com

Jawanet commented Jan 9, 2014

good brother www.alambudidaya.com

@abumalick

This comment has been minimized.

Show comment Hide comment
@abumalick

abumalick 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

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.

Show comment Hide comment
@Zetadisseny

Zetadisseny Aug 31, 2016

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

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

@Bonjur

This comment has been minimized.

Show comment Hide comment
@Bonjur

Bonjur Sep 14, 2016

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

Bonjur commented Sep 14, 2016

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

@benarjeeprasad

This comment has been minimized.

Show comment Hide comment
@benarjeeprasad

benarjeeprasad Dec 19, 2016

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

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

@naazg

This comment has been minimized.

Show comment Hide comment
@naazg

naazg 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?

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.

Show comment Hide comment
@jack404404

jack404404 Jan 27, 2017

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

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

@Lauyou01

This comment has been minimized.

Show comment Hide comment
@Lauyou01

Lauyou01 Feb 6, 2017

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

Lauyou01 commented Feb 6, 2017

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

@aafirasheikh

This comment has been minimized.

Show comment Hide comment
@aafirasheikh

aafirasheikh Feb 13, 2017

i have fixed it at Software Development Company

@endurra

This comment has been minimized.

Show comment Hide comment
@endurra

endurra Mar 1, 2017

@Rajeshchourasia1992

This comment has been minimized.

Show comment Hide comment
@Rajeshchourasia1992

Rajeshchourasia1992 Mar 10, 2017

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

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.

Show comment Hide comment
@Rajeshchourasia1992

Rajeshchourasia1992 Mar 10, 2017

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

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

@leoventans

This comment has been minimized.

Show comment Hide comment
@leoventans

leoventans Mar 23, 2017

Hey, It still has some issue at SEO Company

Hey, It still has some issue at SEO Company

@Chole11

This comment has been minimized.

Show comment Hide comment
@Chole11

Chole11 Apr 15, 2017

Cool, helped me with my escape game website

Chole11 commented Apr 15, 2017

Cool, helped me with my escape game website

@welcomecode

This comment has been minimized.

Show comment Hide comment
@welcomecode

welcomecode Apr 27, 2017

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

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

@OtkupautomobilaBeograd

This comment has been minimized.

Show comment Hide comment
@OtkupautomobilaBeograd

OtkupautomobilaBeograd 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.

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.

Show comment Hide comment
@cuocbong88

cuocbong88 May 22, 2017

Fixed it at M88. Thank you!

Fixed it at M88. Thank you!

@ngabidin

This comment has been minimized.

Show comment Hide comment
@ngabidin

ngabidin May 22, 2017

@wiggledigitalZA

This comment has been minimized.

Show comment Hide comment
@wiggledigitalZA

wiggledigitalZA May 22, 2017

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

wiggledigitalZA commented May 22, 2017

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

@leoventans

This comment has been minimized.

Show comment Hide comment
@leoventans

leoventans 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/

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.

Show comment Hide comment
@trandathust

trandathust 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?

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.

Show comment Hide comment
@sdynamo

sdynamo 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.

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.

Show comment Hide comment
@apk4down

apk4down Jun 21, 2017

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

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

@reneeharperrd

This comment has been minimized.

Show comment Hide comment
@reneeharperrd

reneeharperrd Jun 23, 2017

helo... my website still error ....
Kungfubola

helo... my website still error ....
Kungfubola

@houman2h

This comment has been minimized.

Show comment Hide comment
@houman2h

houman2h Jun 27, 2017

Thank you

Thank you

@houman2h

This comment has been minimized.

Show comment Hide comment
@chuotbumo

This comment has been minimized.

Show comment Hide comment
@chuotbumo

chuotbumo Jul 3, 2017

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

chuotbumo commented Jul 3, 2017

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

@AlexDoughas

This comment has been minimized.

Show comment Hide comment
@AlexDoughas

AlexDoughas Sep 6, 2017

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

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

@LazarinaEvlogieva

This comment has been minimized.

Show comment Hide comment
@LazarinaEvlogieva

LazarinaEvlogieva Sep 11, 2017

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

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

@Jinnhere

This comment has been minimized.

Show comment Hide comment
@Jinnhere

Jinnhere Sep 25, 2017

Thanks for share i test in my site BlogItUpp.

Thanks for share i test in my site BlogItUpp.

@emergency82

This comment has been minimized.

Show comment Hide comment
@emergency82

emergency82 Sep 27, 2017

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

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

@estudio-27

This comment has been minimized.

Show comment Hide comment
@estudio-27

estudio-27 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.

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.

Show comment Hide comment
@dylandang555

dylandang555 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

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.

Show comment Hide comment
@rojgarspot

rojgarspot Oct 10, 2017

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

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

@ek3292

This comment has been minimized.

Show comment Hide comment
@ek3292

ek3292 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?

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.

Show comment Hide comment
@kanth510

kanth510 Oct 31, 2017

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

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.

Show comment Hide comment
@tejascool

tejascool Nov 3, 2017

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

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

@inblogslife

This comment has been minimized.

Show comment Hide comment
@inblogslife

inblogslife 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

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.

Show comment Hide comment
@Myasti

Myasti 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

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.

Show comment Hide comment
@sairamswamy

sairamswamy Nov 27, 2017

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

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

@emergency82

This comment has been minimized.

Show comment Hide comment
@alagandula

This comment has been minimized.

Show comment Hide comment
@alagandula

alagandula 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

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.

Show comment Hide comment
@daniushko

daniushko 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/

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.

Show comment Hide comment
@bet-bg

bet-bg Jan 4, 2018

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

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.

Show comment Hide comment
@apktopsblog

apktopsblog Jan 22, 2018

thank you
very useful www.apktops.ir

thank you
very useful www.apktops.ir

@internop

This comment has been minimized.

Show comment Hide comment
@internop

internop Jan 23, 2018

Thanks you.
Tested this on gifts for your lover .

Thanks you.
Tested this on gifts for your lover .

@g-ads

This comment has been minimized.

Show comment Hide comment
@g-ads

g-ads Feb 5, 2018

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

g-ads commented Feb 5, 2018

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

@kresnabudi

This comment has been minimized.

Show comment Hide comment
@kresnabudi

kresnabudi Feb 8, 2018

thanks share solved for insa.or.id

kresnabudi commented Feb 8, 2018

thanks share solved for insa.or.id

@Technogeekblog

This comment has been minimized.

Show comment Hide comment
@Technogeekblog

Technogeekblog Feb 11, 2018

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

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

@Paulnwachukwu

This comment has been minimized.

Show comment Hide comment
@Paulnwachukwu

Paulnwachukwu Feb 14, 2018

Thanks a lot worked for me on. BloggerSpy

Thanks a lot worked for me on. BloggerSpy

@Byham2012

This comment has been minimized.

Show comment Hide comment
@Byham2012

Byham2012 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?

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.

Show comment Hide comment
@pyaga

pyaga 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

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

@rjmunna

This comment has been minimized.

Show comment Hide comment
@rjmunna

rjmunna Mar 28, 2018

Hello All,
I have same problems in https://mobileinfobd.com and i have tried many solutions from SERP but still not solved the issue.

rjmunna commented Mar 28, 2018

Hello All,
I have same problems in https://mobileinfobd.com and i have tried many solutions from SERP but still not solved the issue.

@Techmigi

This comment has been minimized.

Show comment Hide comment
@Techmigi

Techmigi Apr 23, 2018

Thanks it works for my website Techmigi and Grammyhype

Thanks it works for my website Techmigi and Grammyhype

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