Close

Account

Documentation

Forum

Menu

Archive and Author template don't work with Custom Post Type

  • Post count: 41
    Slowaways
    December 2, 2018 at 10:03 am #40174

    Lista de posts with tags and category don’t show in the archive pages.

    Post count: 41
    Slowaways
    December 2, 2018 at 10:13 am #40175

    Related posts, Inline related posts and AMP Related posts also don’t works!

    Post count: 11180
    Adek
    December 3, 2018 at 4:05 pm #40231

    Hi Slowaways,

    I just want to be sure about this thing. Did you refer to custom post type? Can you provide me with an example of the problem that you get in there?

    Thank you

    Post count: 41
    Slowaways
    December 3, 2018 at 8:26 pm #40258

    Article Custom Post Type with Categories and Tags:

    Professora de Filosofia sofre perseguição ideológica no Ceará


    Tag: https://sin7ese.com.br/tag/assassinato-de-reputacao/

    Post count: 41
    Slowaways
    December 3, 2018 at 8:39 pm #40261

    CPT code:

    Post count: 1127
    Ferdy
    December 4, 2018 at 3:12 pm #40296

    Hi Slowaways,

    1. in this case, you may need to do some adjustment to make custom post type work with our feature.
    2. For the related post issue, it will not work with custom post type because the query is for the posts. in this case, it same like the first issue. you may need to do some adjustment to make custom post type work with our feature.

    Let us know if you have further question.

    Thank you

    Post count: 41
    Slowaways
    December 7, 2018 at 11:03 pm #40500

    That’s why I opened this space, I need the solution. What do I have to modify in the code?

    Post count: 11180
    Adek
    December 10, 2018 at 6:12 pm #40621

    Hi Slowaways,

    In this case, you may need to use JNews child theme to avoid losing all the changes that you made when doing theme update. In this case, at the moment i’m not sure what kind of change that will fit with your need but for a hint you can check this article https://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/ (archive template) and this one https://www.wpbeginner.com/wp-themes/how-to-add-a-custom-author-profile-page-to-your-wordpress/ (author template).

    Thank you

    Post count: 41
    Slowaways
    December 10, 2018 at 9:50 pm #40640

    Many parts and features of the theme are not ready for Custom Post Type:

    /class/Ads.php:112
    if(get_post_type() === 'post' && is_single() && ! is_admin()) -> if(is_single() && ! is_admin())

    /class/Archive/AuthorArchive:
    Add in line 32 inside $attr array: 'post_type' => $this->get_post_types(),???

    /class/Archive/SingleArchive:
    Add after $this->result = $archive = array();:

    /class/Sidefeed/Sidefeed.php:102
    $this->attr['post_type'] = get_theme_mod('jnews_post_types', 'post');

    /lib/theme-filter.php:671
    Delete: if ( get_post_type(get_the_ID()) !== 'post') return false;

    Among others

    Post count: 11180
    Adek
    December 11, 2018 at 1:51 pm #40725

    Hi Slowaways,

    At the moment we don’t fully support the custom post type. It will need to do some adjustment for a certain requirement. We will consider about this thing for the further theme update.

    Thank you

    Post count: 41
    Slowaways
    December 14, 2018 at 1:36 pm #41006

    The theme will only look professional even when you have full support for Custom Post Type.
    I was able to fix the tags and author archive page, but the category archive did not.

    Post count: 11180
    Adek
    December 14, 2018 at 5:58 pm #41044

    Hi Slowaways,

    May i know what the problem that you have with category archive?

    Thank you

You must be logged in to reply to this topic.