[Resolved] How to add the time to the post?

Home Forums Support [Resolved] How to add the time to the post?

Home Forums Support How to add the time to the post?

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #115561
    Elio Martinez

    Hi,

    How can I add the date AND time to every single post? Now we see only the date.

    Thanks.

    #115571
    Tom
    Lead Developer
    Lead Developer
    #115621
    Elio Martinez

    Hi,

    Thanks Tom, but with that function I see the modified date too, and I dont want that. I tried to delete some code to avoid that but I cant make the thing works if I delete something.

    #115626
    Tom
    Lead Developer
    Lead Developer

    You’re seeing the modified date? That part of the code didn’t change at all – the modified date should be only visible to search engines.

    Do you have a link so I can take a look?

    #115645
    Elio Martinez

    Ok, its solved. I saw the modified date only in preview mode. Thanks.

    #115648
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

    #116384
    Elio Martinez

    Tom,

    Withe new version of addons that you sent me yesterday I cant see the hour of the post. I uploaded that function to functions.php in my child theme days ago.

    #116395
    Tom
    Lead Developer
    Lead Developer

    Ah, didn’t anticipate this.

    In newest version of GP Premium, the generate_posted_on() function is used to remove the byline elements completely instead of hiding them if that option is set.

    To override it further with your own function, you’ll have to add it into a custom plugin.

    You can use this plugin to create a plugin: https://wordpress.org/plugins/pluginception/

    Hmm, this is probably going to annoy a lot of people when they update.. Wonder if I can find a better way.

    #116419
    Elio Martinez

    Hoping that you can find a better solution. I have no idea how to create a plugin to have the hour of the post and I prefer to not use a lot of plugins ๐Ÿ™

    #116420
    Tom
    Lead Developer
    Lead Developer

    Not sure it’s possible – users want the disable author, date etc.. to fully remove them, not just hide them, so I have to do it this way.

    The plugin I linked to above is incredibly simple – it gives you a file just like functions.php where you can add your custom PHP.

    You can have 100 plugins like this and won’t affect your site at all, it’s the exact same as adding functions to your theme’s functions.php file.

    #116422
    Elio Martinez

    I have downloaded that plugin, create a new plugin, paste the function in the editor page of the plugin and activate it. Thats it?

    #116423
    Tom
    Lead Developer
    Lead Developer

    That’s it – it should now overwrite the function in Generate Blog.

    #116425
    Elio Martinez

    I have did that but I cant see the hour. I have delete all cache too. I am missing something?

    #116468
    Tom
    Lead Developer
    Lead Developer

    Try deactivating GP Premium and then activating it again.

    I have an idea for a better method I’ll play with tomorrow.

    #116474
    Elio Martinez

    That deactivate-activate GP Premium doesnt make it work.

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