Show date in meta area for custom post types

  • YShahar


    Hello there!

    Well, so far I’ve been able to do all kinds of cool things with Graphene, but at the moment, I’m stumped. I’m trying to show the date published in a custom post type the same way it shows in regular posts.

    For now, I’m working on a test site:

    My custom post archive is here:

    For comparison, I’ve put up a few regular posts here:

    I’m using a child theme.

    Thanks for any help getting this working!







    So, while looking for something totally different on the forum, I came across the following thread:

    I’m new enough to php coding that I don’t know the syntax for applying Syahir’s solution for more than one custom post type. However, as the original poster suggested, one can also copy over the function he referenced to the child theme’s custom functions.php. When I added the different custom post types to the allowed posts, it worked!

    $allowed_posttypes = apply_filters( 'graphene_date_display_posttype', array( 'post' , 'my_custom_post_type1' , 'my_custom_post_type2') );

    I’m sure there’s a better way to do this, but for now, this seems to be working.

Viewing 3 posts - 1 through 3 (of 3 total)

  • You must be logged in to reply to this topic.