• Resolved Masudul Alam

    (@masudwork)


    Nice plugin. Honored the name.

    However, there is a shortcoming. The plugin doesn’t have a Gutenberg block, or even a shortcode! As a result, there is no way to show it on the homepage.

    Hopefully such features will be added as soon as possible.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author George Pattichis

    (@pattihis)

    Hello @masudwork,

    Thank you for your kind words.

    I believe you are missing the point of this plugin so please let me briefly explain. This plugin does nothing more that what is already available in WordPress by default.

    Registering a Custom Post Type (CPT) in WP is done by writing code, as explained here, and specifically using the register_post_type function.

    As a developer, I found myself constantly writing similar code to register CPTs for my clients’ websites and in order to speed-up this process I decided to create a Graphical User Interface to do exactly that. And since there are many WP users that are not very keen with code, or don’t have access to edit their files, I’ve packaged that into a free plugin and released it here. Same goes for custom taxonomies.

    As soon as you use this plugin to create a CPT, then it is up to your theme to use those posts in the frontend of your website. Just like the default post types: Posts or Pages.

    For example, if you create a CPT named books (with my plugin or custom code, it doesn’t matter) then you will find a new menu in your admin dashboard called Books. Just Like Posts. You then add your Books there and you can see them in the frontend by clicking on their permalinks or visiting their archives. Again, just like Posts/Pages. A tip here, you can use ACF (or similar) along with my plugin to further extend the functionality of your CPTs.

    If you want your CPT to have a different frontend view, in single or archive pages, then this is a very abstract task that goes well beyond this plugin’s scope. I wouldn’t know how your theme looks in the frontend, so how can I add a custom styling to display your CPT? Your theme is responsible for that.

    Having said the above, if you tell me what exactly you are trying to achieve, I might be able to point you to the right direction. What you want to do is probably already available in WordPress core or in your theme.

    Hope this clears things up,
    George

    Is there a way to create a page where all the CPTs (archive) show up? I already selected YES for the option — Whether there should be post type archives. But I am unable to assign a page for archive. Theme customization is showing the CPT options except selecting a page for archives.

    Am I missing something tiny.

    • This reply was modified 1 year, 11 months ago by Arvind. Reason: To check the option - Notify me of follow-up replies via email

    Thanks. I figured it out. Successfully displayed archives at https://naitik.org/businesskibatein/

    Plugin Author George Pattichis

    (@pattihis)

    Hello @arvindwp ,

    The option Whether there should be post type archives in my plugin is the equivalent of the has_archive parameter explained here.

    What that means, if you select YES in the above option, is that your newly created CPT, let’s say “Books“, will have an archive displayed at https://yourdomain.com/books/

    Responsible for the layout of that archive page would be one of the templates as explained in the template hierarchy of WordPress. In our “Books” example, WordPress will look for archive-books.php, if it is not found it will use the generic archive.php and if that is missing it will render the page using index.php. You can use a child theme to customize those templates.

    However, you can of course override WP’s default templating mechanism by creating your own queries. The WP_Query is a powerful tool that allows to query and display any kind of data we want from our WP database. The post_type parameter gives us the option to query for any CPTs we want. There’s code example in the previous link on how to display multiple post types, including custom post types.

    There are also a dozen of other ways to query posts, and display them to a page, depending on your theme, page builders, addons or editor blocks you might be using.

    Hope this helps at least a bit and I am glad you figure it out!

    Regards,
    George

    Thanks George.

    Although your explanations are superb, but, I’m not as techy yet. However, I got the crux of it.

    Simple CPT is doing great for me. Giving it 5 Star rating.
    Regards
    Arvind

    • This reply was modified 1 year, 11 months ago by Arvind. Reason: Name spellings
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Lack of Gutenberg blocks or shortcodes’ is closed to new replies.