Powered by LUIT.nl - Constant beta
peterluit_vrijstaand

Database publishing with WordPress: create, edit, view records and fields

Database publishing with WordPress: create, edit, view records and fields

If you have ever been involved in databases, records, fields and relations are the most common words. In WordPress terms like records and fields are not that common, but the concept op custom post types and custom fields are the base of database publishing in WordPress.

• Beaver Themer changes the playing field of template creation

The creation of a Custom Post Type is in terms of database publishing just the creation of a database table with a specific name. Within WordPress it just gets a couple of standard fields like the title (textfield) of each record (post) and its content in a textblock. Some metadatafields like publishing status, date of publication, authorname are added to the database for fitting nicely into the WordPress architecture.

Tools

The creation of a CPT does not add any value to a WordPress website unless you connect fields to the CPT for making a specific web application. The tools for creating CPTs’ and/or fields might give some misunderstanding in your first steps in database publishing within WordPress. In this article we will clarify some of the tools and what they can do within the need for database publishing. For sure we will not cover all tools out there in the market. This spreadsheet overview (might be outdated already for some tools) shows the enormous variations in tools and their possibilities. We will just focus on a couple of tools, which are frequently discussed within the various Beaver Builder Facebook group.
First of all, we will not discuss the price. The price of all the tools (starting at ‘for free’) is just a fraction of the total development costs of your project. Secondly we are also not going into the various DIY (Do It Yourself) possibilities in ‘handmade’ PHP alternatives to get things done. There are numerious resources if you want to develop dedicated solutions.

Field types in ACF Pro

Field types in Pods

In the table above you just get a very simple overview what can be done with the various tools we listed. Choosing the right tool(s) depends on many aspects, which ask for more in-depth study. The creation of just a CPT is rather straight forward. Creating fields however already offers many more varitions between the tools. Fieldtypes like a textfield, a textblock and an imagefield are generally supported in all tools.

Fields in the back-end

More dedicated fields (for example fields which allow connections to fields in other CPT’s (relational fields), are not standard in every tool available. These kinds of field require more knowledge about relational databases in general.

Field types in Toolset Types

Fields determine the power of the tool you choose for building the required solution at the back-end.

ACF (pro) has a very smoothly back-end integration.

Display content on the front-end

To display the content in the front-end, also some variations are available and also require various levels of skills. Until now displaying content outside the standard post types in WordPress (post and pages) required PHP programming to create the requested template. In many CPT/CF based plugins (like for example WooCommerce or Events Manager) this ‘work’ has been done for you to display products or events in both archive pages and single post pages. If you are ‘on your own’, you have to do this yourself. Various tools kan help you getting things done a lot easier. Pods and Toolset Views are long known solutions that could just do their job with shortcodes in general and with PHP for specific requirements. Pods is a bit easier to learn compared to Toolset Views and is therefore a good starting point to experience the power of database publishing in WordPress, since it offers all the tools needed to start buidling complete solutions.

Arrival of Beaver Themer

Now that Beaver Themer hits the market, some new choices arrive and asks for a more in-depth analyses of combining the right tools. If you use Pods or Toolset Views already, you might not need Beaver Themer at all, to get your job done. But if you are using the Beaver Builder Theme, Beaver Builder pagebuilder plugin and maybe even conditionals tools like Beaver Tunnels, you might be tempted to use Beaver Themer as well. Themer is the first tool which is a 100% non-PHP template design tool for both archive and single (custom) post pages and more. It is based on the same drag&drop principle like the BB pagebuilder.

In the various facebook groups a lot of questions are asked whether or not Beaver Themer could work together with ‘the other’ tools. You have to ask yourself whether it makes sence to combinatie Beaver Themer with tools like Pods or Toolset Views, since both also have the template creation tools in it.

Smart combining

It is a matter of smart combining of tools. The creation of a CPT can simply be done with a basic plug-in (Custom Post Type UI) or even manually. Think twice before you do this manually. Adding some functionality to functions.php in your childtheme  isolates the CPT creation just for that theme (thanks Jay Okey for the link). I you coded the CPT yourself (or via GenerateWP online tool), it is a better choice to embed that little piece of code into a very small plug-in to make the creation of the CPT, theme independent.

The second tool you need is a field creation tool. You could use Toolset Types, Pods or Advanced Custom Fields (pro). Look carefully the the ‘fieldset’ they offer and make your choice based on the requirements you need. Advanced Custom Fields Pro offers the most extensive set of fieldtypes.

Investigate the way individual tools work together before using them in business solutions to get the required things done

Once done that you make your final choice which tool will display your content. If you are fine with PHP, you can make your own dedicated template files based on the WordPress template hierarchy. If you just can do a bit of HTML and CSS, but no PHP at all, Beaver Themer might be a good choice. Yes, you do need some HTML/CSS skills to design the layouts if the design requires a bit more than the standard generated layouts done by Themer. If you are somewhere in the middle with your PHP knowledge, you might choose Pods or Views to make the final output design. But don’t put them all together, just because you can. All tools are rather heavy weight tools and might slow down your site. If you just use one very little part from a huge plug-in, restart the combining process to get a better balance in the tools you use for you customer solutions.

Leave a Comment