Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Resolved] Remove Post Date

Home Forums Support [Resolved] Remove Post Date

Home Forums Support Remove Post Date

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #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

    #378604
    Tom
    Lead Developer
    Lead Developer

    Have you tried turning off the date in Customize > Blog > Blog Content?

    #378630
    Gulf 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>

    #378636
    Tom
    Lead Developer
    Lead Developer

    That’s likely being added by a plugin – GP doesn’t had meta properties. Maybe you have Yoast installed?

    #378647
    Gulf State Software

    You are correct. uninstall Yoast removed meta tags.

    #378900
    Tom
    Lead Developer
    Lead Developer

    They should have an option to disable the meta tags within their settings.

    #604610
    Ruben

    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?

    #604659
    Leo
    Staff
    Customer Support

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

    #620933
    Ruben

    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>

    <!– .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?

    #621229
    Leo
    Staff
    Customer Support

    Hmm have you checked with YoastSEO’s support?

    #621866
    Ruben

    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

    #622155
    Leo
    Staff
    Customer Support

    It’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%99

    There is an example on how to use the filter at the bottom of the page.

    #622339
    Ruben

    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

    #622455
    Leo
    Staff
    Customer Support

    That should still work.

    Can you link me to the page that’s not working with the CSS added?

    #622654
    Ruben

    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

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.