• Hi,

    I have a problem with post dates that are NOT displayed for custom post types.
    I created some custom post types but when I publish a post the post date is not displayed for all custom post types only for normal post I can see post dates.
    Anyone haveing the same problem and a solution to overcome the issue?

    thanks in advance,
    millo

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Are you having that problem in the homepage or inside posts? Try looking inside your home.php and single.php respectively see how the post date is being retrieved and displayed.
    If you can’t find it, let me know what theme you are using and I’ll take a look.

    Thread Starter mastermillo

    (@mastermillo)

    Thanks for your reply!
    I use Graphene theme and I tried the standard twentyeleven.
    None of them displays the date of custom post types.

    Further I made a function that displays the post date and added it to an action hook of graphene theme. Also only on normal posts the date is shown.

    thanks for support

    Hi again,

    I asked in the e-mail lists just in case about whether the tags used to retrieve the date in TwentyEleven (get_the_date and get_the_time) should work with custom post types.
    I’ll let you know what I find out.

    Cheers!

    Thread Starter mastermillo

    (@mastermillo)

    Thanks mate for the hint!
    Actually I did not use the get_the_date function,as in graphene theme rather they use the_date or the_time functions.
    I now built a function with echo get_the_date() and it works for every post type.

    thanks for your efforts again.

    I’m glad that worked out, because I didn’t receive any replies from e-mail list. What I don’t get is how come it didn’t work in the Twenty Eleven theme. Perhaps it has smth to do with the printf php function that the theme resorts to in the twentyeleven_posted_on() function.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘post date and custom post type’ is closed to new replies.