Custom Post Type Woocommerce - woocommerce

I have read dozens of posts spanning several years. I can not find any step-by-step explanation how-best to create custom post types, custom taxonomies, custom post fields, and then hook to utilize the Woocommerce single-product template for display?
There will be a price but no actual checkout or buy now because I am using the catalog plugin.
Any guidance would be much appreciated.

Related

CPT instead of WooCommerce "Product"

I have a problem that hopefully you will help me solve.
I'm am pretty new with this job and don't know pretty much anything about coding yet. I built some websites using Elementor but never touched WooCommerce before and now I am working on a real estate website with lots of houses uplouded as a Custom Post Type (which I will call "ANN").
My problem is: my client wants to have a live catalogue of the selling houses for ADS and stuff.
Searching the Web I figured out that WooCommerce is the best way to do it even if I don't need the shopping cart (if you have other ideas are welcome) but as far as I understand WC have ITS OWN CPT "Product" and I wonder how canI set it to use my ANN instead of PRODUCT to the listing?
Is that possible?
The main problem is that there are lots of real estate ads already uplouded so change them is a no go.
I'm using JetEngine plugin for the CPT, Filters, etc.. if this can help somehow.
Thank you for you time!
You could achieve that with the Advanced Custom Fields plugin, but you're gonna need elementor pro.
You can create all the additional fields for the information you need to be displayed in that post type using ACF.
See this link for more information: Creating a Field Group
Make sure your custom post type supports custom fields, if you created it with the CPT UI plugin, you can check that by editing your custom post type and scrolling all the way down. You should see a section with a list of things supported by your custom post type, check custom fields and save.
Then create a template for the custom post type using Elementor's theme builder: How to Create a WordPress Single-Post Template in Elementor
Add the custom fields to the template using the ACF integration with Elementor: Elementor Integration With ACF
Lastly, create a custom loop for your custom post type archive using the Elementor custom skin plugin, so yiu can display the custom fields also in the archive if you need to:
How to display posts in Elementor Pro with your own Design (Elementor Custom Loop)

Multiple Part Wordpress Post

I want to create a blog with stories. Where each story may have multiple chapters. I want to publish chapter wise. Is there any plugin to handle this in WordPress?
You could use core functionalities like categories or even tags as the root of your stories and publish each chapter as new post in this category or with the assigned tag.
Then you could display your stories on an archive page with a custom loop, depending on how/what you want to display (eg. title, content, excerpt...).
You can do this with the Custom Post Type. Here is the plugin you may use.
https://wordpress.org/plugins/custom-post-type-ui/
You can set your Stories as Custom post type and Chapter as a Custom taxonomy. You can also call them on any page, sort them as your chapter vise, you can also show limited chapters stories, etc. with the WP_Query.
https://developer.wordpress.org/reference/classes/wp_query/

WordPress: Convert Custom Post Type to Post including Custom Taxonomies

I need to convert a lot of posts from a Cutom Post Type to normal posts.
All of them have tags and categories based on two different Custom Taxonomies.
Is there any solution to convert the posts and keeping the taxonomies by inverting them to regular post tags and post categories?
I've found many plugins which can convert the posts. But all of them ingore the taxonomies.
I am adding my answer here as well. You can use this plugin to convert the taxonomies https://wordpress.org/plugins/post-type-switcher/. Post and term relationships are added based on ids so the connections won't be lost.

what is the difference between wordpress category and taxonomy?

i just want to know that what is the difference between WordPress category and taxonomy. if you see both works similar so what is the difference.
In WordPress, a taxonomy is a "way" of categorizing / tagging posts.
Read the WordPress Taxonomies Docs.
Categories are a taxonomy. They are a built-in taxonomy that comes by default.
Tags are also a taxonomy. They are built-in also.
You may also create your own custom taxonomies that follow either a "heirarchical" structure (such as categories) or not (such as tags): Custom Taxonomies
What are the WordPress Taxonomies?
Taxonomy is a simple way of organizing data in the WordPress (post, pages, custom post types) by classify and group things.
~ By default Taxonomies are Tags and Categories which are used for posts.
What are the WordPress Catagories?
You can use categories to sort and group your blog posts into different sections. For example, a news website might have categories for their articles filed under News, Opinion, Weather, and Sports.
Note: Taxonomy is the way of organizing data and catagories are the front face of the directory where a certian type of data/information is stored.
Hope this may helps.

Adding Custom Post Types to Woocommerce

Can you please let me know if there is any way to add your own Custom Post Type to Woocommerce and use that instead of using Woocommerce Product?
Thank
You can register a Custom Post Type regardless of WooCommerce. WooCommerce creates a "product" one so you wouldn't need that, but perhaps you want to create an "event" CPT for use with WooCommerce you can do that.
CPT Documenation
If you are planning on replacing the "product" CPT registered by WC then I would begin to question why are you using WC anyways? I suggest you make any additional CPT's you need as an extention of what WC does. Also you should study CPTs and variations, two completely different options/possible solutions for whatever you're trying to build. Variations are part of WC that offer some great options, where as CPT's are native to WP and have a very extensive ability; with them you can use woocommerce hooks to integrate with WC as needed.
Hope that helps, good luck!

Resources