• Resolved frybread

    (@frybread)


    Brecht said “It’s also possible to add it in your theme.” but when posting with my theme (Twenty Sixteen) the date & author are visible. WP Ultimate Recipes seems to make them invisible.

    When someone posts a recipe while using the theme Twenty Sixteen, it would be great to see who posted it and on what date. Any ideas?

    • This topic was modified 7 years, 3 months ago by frybread.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brecht

    (@brechtvds)

    In the theme’s /template-parts/post/content.php you have the following on line 23:

    if ( 'post' === get_post_type() ) {

    Try changing this to:

    if ( 'post' === get_post_type() || 'recipe' === get_post_type() ) {

    That should make sure the author shows up for recipes as well.

    Brecht

    Thread Starter frybread

    (@frybread)

    Thank you brecht! That fix looks like it’s for twenty seventeen, but it gave me the fix for twenty sixteen:

    in theme\inc\template-tags.php find
    if ( 'post' === get_post_type() ) {
    change to
    if ( 'post' === get_post_type() || 'recipe' === get_post_type() ) {

    find
    if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
    change to
    if ( in_array( get_post_type(), array( 'post', 'recipe', 'attachment' ) ) ) {

    • This reply was modified 7 years, 3 months ago by frybread.
    • This reply was modified 7 years, 3 months ago by frybread.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Add author and date in theme: Twenty Sixteen’ is closed to new replies.