Default Blog template for CPT

This topic contains 4 replies, has 3 voices, and was last updated by  Paolo 7 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #341016

    Benjamin Schmitz
    Expired Member
    Post count: 59

    How can I use themes default blog template for created custom post type? We have 3 CPTs but we need to use default blog template only for one (gd_article).

    Thanks!

    #341065

    Kor
    Moderator
    Post count: 16516

    Hi Benjamin,

    Could you please check out this article and see if it’s what you’re looking for? https://codex.wordpress.org/Post_Type_Templates

    Thanks!

    #341176

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    you’ll need to customize the templates listing-listview.php and listing-detail.php

    You’ll need to move them into a fodler named geodirectory within your child theme.

    After that with conditional tags to determin the CPT used, change the code for your custom template.

    This is a moderately complex code customization that requires a good knowledge of PHP and WordPress development tricks.

    There is no easy way to achieve this.

    Thanks

    #341421

    Benjamin Schmitz
    Expired Member
    Post count: 59

    Thanks man, didn’t realize I need to customize listing-listview.php.
    All done, working great. Thanks.

    #341422

    Paolo
    Site Admin
    Post count: 31206

    You are welcome 🙂

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount