• dan

    (@daniel-berhane)


    Hello pals,
    Is it bad if a WordPress MultiSite has subsites, each of which have a couple of CPTs and custom taxonomies?

    It will be handy for readers and authors(since each author can be assigned to write on a specific CPT of a subsite).

    But what about the technical/database/SEO side of the matter?(from a layman point of view, it seems like it will be “too fragmented”)

    Any advise please?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s not bad, just keep in mind hwo you add CPTs. If you don’t want them around on all sites, you’ll have to tweak them.

    Thread Starter dan

    (@daniel-berhane)

    Thanx.
    I bet I wont need most CPT on more than one site.
    So, would you tell me/recommend a material on the tweaks?
    Any CPT plugin creator you wold recommend?

    Thanx again.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Thread Starter dan

    (@daniel-berhane)

    Thanx.
    I am reading both.
    If you don’t use generator, I think, nor should I. ??

    Thread Starter dan

    (@daniel-berhane)

    @ipstenu (Mika Epstein)
    Please help me with the following questions about your first link:

    a/ Would you tell me what the word “drawing” stands for in your CPT code?
    b/Need I change it with the name of the CPT that I want to create?

    c/Should I repeat all the three codes (that you listed) whenever I create a CPT?
    d/Should/can I put the codes for all CPTs in the same php file?(your example was photo-cpt.php.)

    Thank you in advance.

    Thread Starter dan

    (@daniel-berhane)

    I wanted to create a CPT named recap.
    So, I create mu-plugins folder within wp-includes
    I created a new file and named it mycpts-cpt.php
    Then, copied your codes by changing: drawing/s with recap/s, photos with my and the URI with the website’s address.

    But it is not working. Where did I err?
    Here is a copy of the php file I created.

    <?php
    /*
    Recap Name: My CPTs
    Recap URI: https://hornaffairs.com/
    Description: All My custom code.
    Version: 1.0
    */
    ?>
    <?php
    	add_action( 'init', 'create_my_post_types' );
    
    	function create_my_post_types() {
    
             /* Labels for the Recap post type. */
            $recaps_labels = array(
                    'name' => __( 'Recaps', $domain ),
                    'singular_name' => __( 'Recap', $domain ),
                    'add_new' => __( 'Add New', $domain ),
                    'add_new_item' => __( 'Add New Recap', $domain ),
                    'edit' => __( 'Edit', $domain ),
                    'edit_item' => __( 'Edit Recap', $domain ),
                    'new_item' => __( 'New Recap', $domain ),
                    'view' => __( 'View Recap', $domain ),
                    'view_item' => __( 'View Recap', $domain ),
                    'search_items' => __( 'Search Recaps', $domain ),
                    'not_found' => __( 'No Recaps found', $domain ),
                    'not_found_in_trash' => __( 'No Recaps found in Trash', $domain ),
            );
    
            /* Arguments for the Recap post type. */
            $recaps_args = array(
                    'labels' => $recaps_labels,
                    'capability_type' => 'post',
                    'public' => true,
                    'has_archive' => true,
                    'can_export' => true,
                    'query_var' => true,
                    'rewrite' => array( 'slug' => 'Recaps', 'with_front' => true ),
                    'taxonomies' => array( 'post_tag', 'category'),
                    'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'custom-fields', "my-post-settings" ),
            );
    
            /* Register the Recap post type. */
            register_post_type( apply_filters( 'my_Recaps_post_type', 'Recaps' ), apply_filters( 'my_Recaps_post_type_args', $recaps_args ) );
    	}
    ?>
    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    a/ Would you tell me what the word “drawing” stands for in your CPT code?
    b/Need I change it with the name of the CPT that I want to create?

    It stands for the name of the post type.

    Read through https://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress – You’re asking pretty basic CPT questions, which means you don’t yet understand all the moving parts. Take it one at a time ??

    Thread Starter dan

    (@daniel-berhane)

    If so, why is not working? As you can see above, I replaced drawing with the new CPT’s name.

    By the way, I had already figured how to create a CPT by trial and error.

    But I wanted to apply your codes.

    I would take a step back and start basic reading if I could figure out how to display CPTs in the slider.

    Thanx.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    My codes are meant to be an example.

    WHAT is not working? You didn’t explain that ?? Do you get a 404 on some pages…? Is it not showing up in the admin section?

    The word ‘It’ is too vague to debug.

    Thread Starter dan

    (@daniel-berhane)

    I didn’t say your codes are bad or stuff.
    All I said is that, I used them in the manner described above.

    I suspected that replacing “drawing/s” with my new CPT name might be the cause of problem. From your comment, I learnt it was not.

    Do you get a 404 on some pages…? Is it not showing up in the admin section?

    Nothing happens. In fact, I am working as usual with no change, despite the presence of that file in my wp-includes/mu-plugins directory.

    [Thanx for ur time]

    despite the presence of that file in my wp-includes/mu-plugins directory.

    Yup, that’s why nothing is happening ?? You need to put the file(s) in wp-content/mu-plugins/ per the codex.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Multisite CPTs = too much fragmentation?’ is closed to new replies.