This topic has 9 replies, 2 voices, and was last updated 8 years by sharmstr.

  • Author
  • #97245
     clyn
    Participant

    Hi,

    Kleo themeoption/ metafields / archieve link is active. I have 2 site (one of them is test) same pluging same custom post type etc.  My test site show author archieve post but dont show my other real site…

    I bet i did mistake somewhere, what or where should i check? I checked custom post types setting (both same)

    sorry very bad english

    thanks…

    #97261
     sharmstr
    Moderator

    A few things to check.

    1 – By default, CPTs will not show up in standard WP archives. You need to tell WP to show them.

    COPY CODE
    
    function custom_post_author_archive( $query ) {
        if ( $query->is_author() ) {
            $query->set( 'post_type', array('your-cpt', 'post') );
        }
    }
    add_action( 'pre_get_posts', 'custom_post_author_archive' );
    

    2 – Is your CPT set up on the same on both servers? Specifically the publicly_queryable parameter?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #97283
     clyn
    Participant

    1 – I did not any code on my test site but show all author archieve post (also custom post types). If i want to add this code, to where?

    2 – I have SSD VDS server. So, my test site (include all kleo demo) and my real site is on same server. Does it make any problem?

    #97288
     clyn
    Participant

    sorry, my test site show only post (author archieve) dont show CPT

    #97289
     clyn
    Participant

    I am so sorry, some little details change everything. My real site also show normal author post. Just dont show CPT post.. what should i do? Add abve code to where?

    #97291
     sharmstr
    Moderator

    To your child theme’s functions.php file.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #97298
     clyn
    Participant

    🙂 great, its working.

    At the moment, you ask, “test site and real site is on same server” … Yes, test site include all kleo demo and 2 custom post types (for test but post type slug is different) … Is it problem to work on same server?

    Thank you so much perfect support team…

    #97301
     sharmstr
    Moderator

    I didnt ask that.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #97305
     clyn
    Participant

    sorry for my bad english 🙂 , whatever, its working and solved.

    Thnak you so much…

    #97306
     sharmstr
    Moderator

    No problem 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

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

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?