- This topic has 21 replies, 4 voices, and was last updated 5 years, 4 months ago by
Leo.
-
AuthorPosts
-
September 3, 2017 at 12:44 pm #378457
Gulf State Software
Hi,
Need to remove publish date from post. I am using posts as pages and tried to hide the date. But css hide or display none can’t work in metatag.
Because date is still in meta tag, google showing my post date in search result. Please show my how to delete or change meta tags.
something like remove:
<meta property=”article:published_time” content=”2017-05-01T00:21:22+00:00″>
<meta property=”article:modified_time” content=”2017-08-26T20:50:00+00:00″>
<meta property=”og:updated_time” content=”2017-08-26T20:50:00+00:00″>this url form : https://www.gulfstatesoftware.com/web-development-in-houston.html
September 3, 2017 at 10:43 pm #378604Tom
Lead DeveloperLead DeveloperHave you tried turning off the date in Customize > Blog > Blog Content?
September 3, 2017 at 11:23 pm #378630Gulf State Software
After hide this area –>”Customize > Blog > Blog Content”. Date is not showing , but meta tag is still visible in head, google is reading that tag and showed in result :
<head>
…….
…….
<meta property=”article:published_time” content=”2017-05-01T00:21:22+00:00″/>
<meta property=”article:modified_time” content=”2017-08-26T20:50:00+00:00″/>
<meta property=”og:updated_time” content=”2017-08-26T20:50:00+00:00″/>
…….
…….
</head>September 3, 2017 at 11:28 pm #378636Tom
Lead DeveloperLead DeveloperThat’s likely being added by a plugin – GP doesn’t had meta properties. Maybe you have Yoast installed?
September 4, 2017 at 12:11 am #378647Gulf State Software
You are correct. uninstall Yoast removed meta tags.
September 4, 2017 at 8:59 am #378900Tom
Lead DeveloperLead DeveloperThey should have an option to disable the meta tags within their settings.
June 20, 2018 at 11:03 am #604610Ruben
Hello.
I remember that GP features used to work fine and my dates were not showing on google. But I just noticed this problem in one of my webs and I think it might be this Yoast issue.
I tried to hide the dates and metas from my yoast settings but when I see the source of my posts I still find the dates on meta tagas in the head section. I do not understand.
Or do I literally need to uninstall the yoast plugin?
June 20, 2018 at 12:25 pm #604659Leo
StaffCustomer SupportThis might be something you need to ask YoastSEO’s support.
A good place to start would be to disable Yoast and see if it works for you.
July 11, 2018 at 4:18 am #620933Ruben
Hi.
Before I removed YoastSEO I tried to put the next code:
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Date Meta Tags Output by Yoast SEO
* Credit: Yoast development team
* Last Tested: Mar 01 2017 using Yoast SEO 4.4 on WordPress 4.7.2
*/
add_action(‘wpseo_dc_’.’DC.date.issued’, ‘__return_false’); // Premium only
add_filter( ‘wpseo_og_article_published_time’, ‘__return_false’ );
add_filter( ‘wpseo_og_article_modified_time’, ‘__return_false’ );
add_filter( ‘wpseo_og_og_updated_time’, ‘__return_false’ );As suggested in this this thread in the wordpress web: https://wordpress.org/support/topic/how-to-remove-meta-dates-lines/
However when I tried to use it with the simple custom css it did not recognize that code (sorry I am bad at these things) and did not know what to do. Is there any way to use it correctly for my generatepress web? Apparently is the answer to the problem by the yoast team.
The problem is that even if I decide to disable this plugin the serps in Google still show the published date. I guess because it is here:
<header class=”entry-header”>
<h1 class=”entry-title” itemprop=”headline”>Análisis y revisión de eToro</h1><span class=”posted-on”><time class=”updated” datetime=”2018-07-11T10:41:57+00:00″ itemprop=”dateModified”>11 julio, 2018</time><time class=”entry-date published” datetime=”2018-05-20T18:00:26+00:00″ itemprop=”datePublished”>20 mayo, 2018</time></span><!– .entry-meta –>
</header><!– .entry-header –>So this appears despite having removed the meta tags from the <head>
I do not know what to do now.
Do you know of any way I could get rid of this problme?
July 11, 2018 at 9:28 am #621229Leo
StaffCustomer SupportHmm have you checked with YoastSEO’s support?
July 12, 2018 at 5:14 am #621866Ruben
I had a look at YoastSEO answers about this issue and found some in stackoverflow and github. Those codes could be added in the php.functions or through some plugin and they should work apparently.
However, I decided to disable YoastSEO, so all my metatags dissapeared from the <head> section. I took for granted that it would sort the problem, but after I checked a couple of weeks later the dates were still being shown in the serps.
Then I had a look into the source code of the page and found the “published time” into the <header class=”entry-header”>.
Then, having a look today I noticed that I have the “show the dates” working in my GP settings, because I thought that the code to remove the dates from categories that I have since long time ago was working:
.category-acciones .posted-on { display: none; } .category-broker-cfds-y-forex .posted-on { display: none; } .category-broker-institucional .posted-on { display: none; } .category-broker-acciones .posted-on { display: none;
So that code is making that the dates do not show in the post but when I look at the view-source I can see the published date in the <header class=”entry-header”>
The only way to remove that now is to just disable the “display date” in the GP blog section.
Is that old code “.category-categoryx .posted-on…” not working anymore?
Maybe I am missing something
July 12, 2018 at 9:13 am #622155Leo
StaffCustomer SupportIt’s definitely better to use the customizer function then CSS.
If you only want to hide dates on certain category, you can use this powerful filter as well:
https://docs.generatepress.com/article/option_generate_blog_settings/#options-%E2%80%98date%E2%80%99There is an example on how to use the filter at the bottom of the page.
July 12, 2018 at 12:44 pm #622339Ruben
Hello
So I would need to use that Code Snippets plugin I guess. Not sure how to add that php code to remove the date of a specific category. Do not know how to write that code in that case.
So, the old code I used to use for CSS:
.category-reviews .posted-on { display: none; }
Does it not work anymore? Have you heard of any other people reporting it?
It used to work well before. I wonder what has changed
July 12, 2018 at 6:10 pm #622455Leo
StaffCustomer SupportThat should still work.
Can you link me to the page that’s not working with the CSS added?
July 13, 2018 at 1:36 am #622654Ruben
For example. I have the next code in the css to remove the dates for certain categories:
/* poner categorías sin fechas*/ .category-acciones .posted-on { display: none; } .category-broker-cfds-y-forex .posted-on { display: none; } .category-broker-institucional .posted-on { display: none; } .category-broker-acciones .posted-on { display: none; } .category-brokers-criptomonedas .posted-on { display: none; } .category-brokers-futuros .posted-on { display: none; } .category-brokers-metales .posted-on { display: none; } .category-comisiones-brokers .posted-on { display: none; } .category-educacion .posted-on { display: none; } .category-broker-opciones-binarias .posted-on { display: none; } .category-opiniones-brokers .posted-on { display: none; } .category-paises .posted-on { display: none; } .category-software-bolsa .posted-on { display: none; } .category-webs-bolsa .posted-on { display: none; }
The next post belongs to one of those categories(broker-cfds-y-forex): http://www.mejorbrokerdebolsa.com/analisis-y-revision-de-etoro/
The post does not show dates, category, tags, etc. However, when I see the view-source I find the published date in line 256: <time class=”entry-date published” datetime=”2018-05-20T18:00:26+00:00″
I think that the code provided should block ir from appearing there, should not it?
Only if I unclick the “display date” from the customizer in the blog section, that published date dissapear in the view-source.
Another problem I am noticing in this blog is that even the categories that should be displaying dates, categories or tags are showing nothing in the post, even if I click everthing on in the customizer. I will leave that for another thread though.
Thank you
-
AuthorPosts
- You must be logged in to reply to this topic.