Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1094674

    Hi,

    In my loop-index.php

    I’ve this code

    if (get_the_modified_time() != get_the_time()) {
    				
    				echo "<time class='date-container' itemprop='dateModified' datetime=".get_the_modified_time('c')."> Mis &agrave; jour le ".get_the_modified_time(get_option('date_format'), $the_id)."</time>";//modif
                   	echo ", ";
    				}
    				echo "<span class='date-container minor-meta updated'>Publi&eacute; le ".get_the_time(get_option('date_format'))."</span";
    				echo "<span class='text-sep text-sep-date'>, </span>";

    I wish to not display publish date if post is older than N days from today (eg: 500 days)

    How do i do that ?

    Best

    #1095304

    Hey serge esteves,

    You need to check here for that:

    
    if (get_the_modified_time() != get_the_time()) {
    

    add another condition checking if the date is before 500 days.

    Best regards,
    Victoria

    #1095346

    Yes, I know that :)

    Could you tell me exactly the code to insert ?

    best

    #1096522

    Hi,

    It would require quite some time to build a custom function and add the modifications to the theme files, so I am sorry to tell you that this is not covered by our support.

    The below plugins is note tested with Enfold but it has worked for others. Please feel free to try a plugin that suits your needs

    Old Post date remover
    WP Plugin Archive

    However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Vinay

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