Adding Custom Post Types to Woocommerce - wordpress

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!

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)

Woocommerce, variations, custom field and WP All Import plugin

I am trying to add a custom field for all my product variations and show this on the single product page.
I am using "WooCommerce: Add/display Product or Variation custom field everywhere" answer code and it does everything I need.
But the custom field is not visible anywhere in WP All Import plugin. Adding data manually to each variation works.
Also wondering if I am overcomplicating this a bit?
All help would be greatly appreciated.

Wordpress - CPT and ACF Plugins

I'm about starting developing my own theme by using CPT and ACF Plugins. I read some articles and reviews about CPT as well as ACF and most of the developers they love them because they are very easy to use and helpful. However some of them they gave very bad feedback in terms of security, stability and slowing down the performance of the website; even they said these plugins for non-technical developers which developing for cheap clients.
What do you think about this? because I like CPT and ACF very much once I tried doing things with them. However I don't want to put my self in a risk by using these plugins.
Also do you suggest another professional way to create Custom Post Type and Custom Fields? or do you prefer CPT and ACF anyway for even the advanced developer?
Thanks.
First of all
It is depending on your requirements. If you have to create only one or two post type. I don't think it is really a need to use those plugins. Because both are heavy plugins.So better to use custom code to create post type. and custom field.
Regarding the plugins, It is true that CPT is more heavy then ACF. I have used ACF from the beginning. Before that CPT was my favourite. I came to know about the above complexity as i have much more experience with those plugins.
For CPT it's very truth.
You can do it with simple code, no plugins needed.
For ui use generator before add to theme functions, like this site:
https://generatewp.com/post-type/
For custom fields ACF is useful to UI elements, so just if it's a special value use ACF. Then just add metabox to cpt.

Create Categories and Products in wordpress without plugins

I am new to wordpress and i want to create a online shopping store. So i just want to know how to create a categories and products without using any plugin. Please also tell me which one is better approach with plugins or without plugins. Thanks in advance.
If you are going to use a plug in for custom categories and custom types depends in the complexity and the amount of the categories and types of your site you want to build.
Either ways I recommend you to use Advanced Custom Fields and Custom Types which are both Free and efficient.
Found here:
[http://wordpress.org/plugins/advanced-custom-fields/][1]
[http://wordpress.org/plugins/types/][1]

Wordpress custom post type and permalink rewriting

I'm struggling with a problem I'm not able too solve.
I've spent a lot of hourse in codex documentation without any luck.
I've created a custom post type called "Products". Products will be available in many language. Products permalink is something like: mysite.com/products/product-name What I need instead is something like this: mysite.com/language/products/product-name.
What I need to create the permalink? Have I to add some fancy rule with WP_Rewrite?
Is it possibile to have custom post type as page child's?
I don't really need custom taxonomy so if you know a better solution fell free to write.
Thanks for any suggestion.
You need a plugin for wordpress to gracefully handle multiple languages.
I suggest you check out wpml.org
For how the Wordpress Multilingual plugin works with custom posts types, check out their informative blog post.

Resources