custompress "settings->create template file for:"

Hello,

I installed CustomPress on my Multisite->Subdomain installation of WordPress and Network Activated the plugin.

I would like to generate a template file for one of my custom post types created on a subsite but the option to "Create Template File For: [posttype]" in CustomPress settings is not available for a subsite.

Any ideas would be very much appreciated.

Thank you,

Tin

  • Ash

    Hello @hoangker

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    "Create Template File For: [posttype]" in CustomPress settings is not available for a subsite => This is default behavior. This creates a template file in the theme so that the user can customize the file as per his wish. Now in a multisite platform the problem is if the multiple users wants to create template file for the same post types multiple times. So, it will be conflicted.

    Cheers
    Ash

  • hoangker

    Hi Ashok,

    thank you for your response. Ok, I understand now that on my multisite platform the "Create Template File For.." is disabled because of what you said:

    "Now in a multisite platform the problem is if the multiple users wants to create template file for the same post types multiple times. So, it will be conflicted."

    Maybe I can leverage the Wordpress platform in conjunction with CustomPress to accomplish what I need done. Namely, I want to create a custom post type on a subsite and have a custom page to render these types. Here it is..maybe you or someone in the community can help:

    I was thinking create a stylist custom post type and create a Taxonomy called stylist_type. Would I create a file called archive-stylist.php file and dump it in my theme to leverage the Wordpress template tree so it knows to use archive-stylist.php to render my custom page? I was thinking of using this method to mimic the above feature - Create Template File For: [posttype]. I just don't know exactly what the template file I create needs to be called? archive-stylist.php? archive-stylist_type.php? single-stylist.php? I know the name depends on my custom post type name, but, can someone give me a detailed explanation of what to do?

    Thanks,

    Tin

  • Ash

    Hello @hoangker

    I hope you are well today.

    So, you have a post type called: stylist
    And a custom taxonomy: stylist_type

    So, you have to create template files inside your theme:

    For single post of this post type: single-stylist.php
    For archive page of this post type: archive-stylist.php
    For taxonomy page: taxonomy-stylist_type.php

    It should work :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • hoangker

    Hello Ashok,

    I implement the templates you suggested on my local development box:

    For single post of this post type: single-stylist.php - works
    For archive page of this post type: archive-stylist.php - works
    For taxonomy page: taxonomy-stylist_type.php - DOES NOT WORK

    The taxonomy page template I created is not being used for some reason and it's falling back to archive.php to render these custom taxonomies created in CustomPress.

    Do you have any other ideas? Here is the url, on my local machine, that is trigger the load of archive.php,but, not taxonomy_stylist_type.php

    http://localhost/custom_theme/?stylist_type=bgstylist

    thank you,

    Tin

  • Ash

    Hello @hoangker

    In that case, I need to check the files. Would you please upload the site somewhere and send me ftp and login details?

    To send me details, please use our contact form: https://premium.wpmudev.org/contact/

    Select: I have a different question
    Subject: Attn-Ash
    Details: Send all required details (admin info and ftp details) with a link of this thread, so that I can track.
    Also post a note here once you send the info.

    I will be happy to take a look :slight_smile:

    Cheers
    Ash