Wordpress - CPT and ACF Plugins - wordpress

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.

Related

WooCommerce custom theme development best practices

I made an e-commerce website before where I copied the template files inside WooCommerce and edited them to display the content how I wanted. But now I know of shortcode and WP_Query which can also be used to get the products / categories etc.
So what I am wondering is which method is best and are there times where you would use one method over another?
There is actually a time and place for different methods. Nix the shortcode though. Generally speaking you shouldn't "hard code" shortcodes into a custom theme (there are exceptions of course), unless you mean that you want to build in a shortcode that theme-users have access to.
That said, if you want to emulate WooCommerce's current style/layout with your own flair, or you want to extend the current templates, use the current template override method. Note this will lead to your theme getting "stale" at some point. WC does a decent job of not changing the templates too often, but it does happen and your theme should accommodate when that happens.
If you're doing something different with a list of products entirely that's not necessarily supposed to look ingrained in the WooCommerce structure, then you can use a custom WP_Query or Database query to accommodate your needs.
So effectively:
If you want to tweak, extend, or reduce the current WooCommerce structure, use template overrides
If you want a fully customized solution or need WC Products in a different capacity, use a custom query method.
Everything woocommerce do well.
No need to use WP_Query separately
If you wants customize the theme you can use add_action() and add_filter()
Also you can modify css.
Hooks Referance:
https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

Wordpress - form to capture the values for the custom post type

I want to add a new entity named "ideas" having different fields. I want to add this to the admin side, where a logged in user can add/edit new "idea", which can be published/unpublished to the site.
I don't want to edit via php and make things complicated, instead do it from the wp-admin log in front-end. Is there a plugin for this? I need 3-4 such entities to be created, and define fields for each such entity.
New edit:
Custom Post Type is the best option I feel. Can anyone suggest, a free plugin for form to capture the values for the custom post type?
According to this WCK - Custom Fields and Custom Post Types Creator plugin you can achieve this.
WordPress Creation Kit consists of three tools that can help you
create and maintain custom post types, custom taxonomies and most
importantly, custom fields and metaboxes for your posts, pages or
CPT's.
WCK Custom Fields Creator offers an UI for setting up custom meta
boxes with custom fields for your posts, pages or custom post types.
Uses standard custom fields to store data.
WCK Custom Post Type Creator facilitates creating custom post types by
providing an UI for most of the arguments of register_post_type()
function.
WCK Taxonomy Creator allows you to easily create and edit custom
taxonomies for WordPress without any programming knowledge. It
provides an UI for most of the arguments of register_taxonomy()
function.
Hope it helps you.
You can use a combination of two plugins to fit your needs:
The Custom Post Type UI (https://wordpress.org/plugins/custom-post-type-ui/) makes it possible to generate Custom Post Types (like "Posts" or "Pages") and Custom Taxonomies. This is how you can create your entity "ideas" which will show up in the admin menu.
With Advanced Custom Fields (https://wordpress.org/plugins/advanced-custom-fields/) you can define additional content fields for your "ideas"-posttype and others. It also can handle relations between your added custom-post-types
Using the SWIFT Templates as proposed in Touqueer Shafis answer will be sufficient when you only have smaller bits of information to display on the page or if you just want to display archives of your custom-post-types. But you will quickly reach the borders of these templates when it comes to single-pages.
I recommend altering the PHP of your template files manually: you will have more control where and when to display the contents of the custom-post-types and custom-fields you added on your page.
Well, I'm not really gonna give you the answer you want to hear but I want to give you an advice from my own experience.
Using a plugin will make things usually much more complicated than doing it manually. Consider some things:
1) The plugin may not be supported for ever (or long), so if the author decides that he or she wants to be a gardener instead of a developer you're screwed. Unless you want to wrap your head around the plugin code and proceed developing it on your own. This is especially true for "underground"-plugins which are not so popular and/or maintained by a single person. Although I think you CAN rely on the "big" players like "Advanced custom fields"
2) At some point you may find that the plugin you are using doesn't support some sort of customization that you really need and quite a few plugins are built in a way that makes it hard to extend them or break out from the way they work.
So I recommend you to wrap your head around custom taxonomies and post types and just add them with PHP in your functions.php or a custom plugin. It's very very easy (it's really just arrays with arguments). You could use this visual code generator as a starting point:
http://generatewp.com/post-type/
And for adding custom fields I recommend using Advanced custom fields. You won't need any other plugin for backend management customization and it's built in a way that you can even export your custom fields as php so if they ever drop support you still have a good starting point.

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 Functionality: Custom Theme or Plugin?

I am new to Wordpress (using roughly 6 months) and just now getting into development when I decided I would attempt to replicate a project I have going currently and after reading multiple blogs regarding plugin development and custom post types, I am thoroughly confused as to which direction I should go. I am in need of creating a site that has back-end management (admin only) and then end-user management where the end-user should have a page that allows them to manage their items.
With custom post types, I am able to create the objects that I will need to use but that doesn't give me total control when it comes to allowing the end-user to modify them from a front-end interface.
With a plugin, I think I am able to create exactly what I need but not sure how to yet but at the same time, thinking through the structure of Wordpress, everything is basically a post, correct? So, if that's the case, my plugin would need to have the ability to register new custom post types. Does it sound like I am on the right track or am I way off here?
Custom Post Types can add a lot of power, especially if you dress up the Custom Fields with meta boxes. You can always use a role-scoping plugin to limit the access of end-users to only be able to use these Custom Posts and nothing else. CPT are a great way to handle inventory management and not rely on a plugin that will either cost $ or potentially break months down the road.
That said, many plugin you would find would most likely just create a Custom Post Type anyway. Take a look around on the codex for info on creating CPT, and if you're interested, look at jaredatch's work on Github.
http://codex.wordpress.org/Post_Types
https://github.com/jaredatch/Custom-Metaboxes-and-Fields-for-WordPress

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