Custom post type archive template missing

Viewing 4 posts - 1 through 4 (of 4 total)
  • #18494
    bigdrobek
    Participant

    Hello,
    I would like to setup own archive.php template for its custom post type. But it seems like you don’t use archive.php. I Can you advice me how to do this?

    Thank you,
    Radek

    WPMU 3.9.1,
    childtheme from Esplanade theme,

    #18500
    bigdrobek
    Participant

    I create new file archive-(custom_post_name).php, and I tried to copy inside the code from index.php.
    It works without styling, but works.

    Now I have trouble to activate featured image in post editor. I did some research and found that I have to put to my function.php this code:
    add_theme_support( 'post-thumbnails', array( 'post','custom_post_name' ) );

    But this not work for me πŸ™
    Any idea how to activate featured images?

    #18501
    bigdrobek
    Participant

    I got it, the mistake was in child theme functions.php

    Here is my function php to activate featured image metabox:
    Please check it, I just copy content form original and make small change.

    #19082
    noaneo
    Participant

    hi,

    http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/

    in functions.php of child theme that put the code for your Featured Image, do not take the functions.php of the theme code parent.

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

You must be logged in to reply to this topic.