{"id":1889,"date":"2017-05-03T10:11:51","date_gmt":"2017-05-03T08:11:51","guid":{"rendered":"https:\/\/www.nieuwsmarkt.nl\/?p=1889"},"modified":"2017-10-01T09:09:54","modified_gmt":"2017-10-01T07:09:54","slug":"database-publishing-with-wordpress-create-edit-view-records-and-fields","status":"publish","type":"post","link":"https:\/\/www.nieuwsmarkt.nl\/nl\/blog\/2017\/05\/03\/database-publishing-with-wordpress-create-edit-view-records-and-fields\/","title":{"rendered":"Database publishing with WordPress: create, edit, view records and fields"},"content":{"rendered":"<p><strong>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.<\/strong><!--more--><\/p>\n<p><em>\u2022 Beaver Themer changes the playing field of template\u00a0creation<\/em><\/p>\n<p>The creation of a<a href=\"https:\/\/codex.wordpress.org\/Post_Types\" target=\"_blank\" rel=\"noopener noreferrer\"> Custom Post Type<\/a> 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.<\/p>\n<h3>Tools<\/h3>\n<p><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1905 alignright\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview.jpg\" alt=\"\" width=\"425\" height=\"291\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview.jpg 1636w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview-300x206.jpg 300w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview-768x527.jpg 768w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/cpt-cf-overview-1024x702.jpg 1024w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/a>The creation of a CPT does not add any value to a WordPress website unless you connect\u00a0fields to the CPT for making a specific web application. The tools for creating CPTs&#8217; 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. <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1mSqienVYxLopTFGLPK0lGCJst2knKzXDtLQRgwjeBN8\/edit#gid=3\" target=\"_blank\" rel=\"noopener noreferrer\">This spreadsheet overview<\/a> (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 <a href=\"https:\/\/www.facebook.com\/groups\/beaverbuilders\/\" target=\"_blank\" rel=\"noopener noreferrer\">Beaver Builder Facebook group<\/a>.<br \/>\nFirst of all, we will not discuss the price. The price of all the tools (starting at &#8216;for free&#8217;) is just a fraction of the total development costs of\u00a0your project. Secondly we are also not going into the various DIY (Do It Yourself) possibilities in &#8216;handmade&#8217; PHP alternatives to get things done. There are numerious resources if you want to develop dedicated solutions.<\/p>\n<div id=\"attachment_1907\" style=\"width: 198px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-acf.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1907\" class=\"wp-image-1907\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-acf.jpg\" alt=\"\" width=\"188\" height=\"582\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-acf.jpg 224w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-acf-97x300.jpg 97w\" sizes=\"auto, (max-width: 188px) 100vw, 188px\" \/><\/a><p id=\"caption-attachment-1907\" class=\"wp-caption-text\">Field types in ACF Pro<\/p><\/div>\n<div id=\"attachment_1909\" style=\"width: 259px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-pods.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1909\" class=\"wp-image-1909\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-pods.jpg\" alt=\"\" width=\"249\" height=\"355\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-pods.jpg 309w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-pods-211x300.jpg 211w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/a><p id=\"caption-attachment-1909\" class=\"wp-caption-text\">Field types in Pods<\/p><\/div>\n<p>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.<\/p>\n<h3>Fields in the back-end<\/h3>\n<p>More dedicated fields (for example fields which allow connections to fields in other CPT&#8217;s (relational fields), are not standard in every tool available. These kinds of field require more knowledge about relational databases in general.<\/p>\n<div id=\"attachment_1919\" style=\"width: 461px\" class=\"wp-caption alignright\"><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-types.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1919\" class=\"wp-image-1919\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-types.jpg\" alt=\"\" width=\"451\" height=\"182\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-types.jpg 803w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-types-300x121.jpg 300w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/fields-types-768x310.jpg 768w\" sizes=\"auto, (max-width: 451px) 100vw, 451px\" \/><\/a><p id=\"caption-attachment-1919\" class=\"wp-caption-text\">Field types in Toolset Types<\/p><\/div>\n<p>Fields determine the power of the tool you choose for building the required solution at the back-end.<\/p>\n<blockquote><p>ACF (pro) has a very smoothly back-end integration.<\/p><\/blockquote>\n<h3>Display content on the front-end<\/h3>\n<p>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\u00a0the requested template. In many CPT\/CF based plugins (like for example WooCommerce or Events Manager) this &#8216;work&#8217; has been done for you to display products or events in both archive pages and single post pages. If you are &#8216;on your own&#8217;, you have to do this yourself. Various tools kan help you getting things done a lot easier. <a href=\"https:\/\/wordpress.org\/plugins\/pods\/\" target=\"_blank\" rel=\"noopener noreferrer\">Pods<\/a> and <a href=\"https:\/\/wp-types.com\/home\/views-create-elegant-displays-for-your-content\/\" target=\"_blank\" rel=\"noopener noreferrer\">Toolset Views<\/a> 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.<\/p>\n<h3>Arrival of Beaver Themer<\/h3>\n<p><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/themer.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1991\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/themer.jpg\" alt=\"\" width=\"320\" height=\"140\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/themer.jpg 732w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/05\/themer-300x131.jpg 300w\" sizes=\"auto, (max-width: 320px) 100vw, 320px\" \/><\/a>Now that <a href=\"https:\/\/www.wpbeaverbuilder.com\/beaver-themer-1-0-new-world-possibilities\/\" target=\"_blank\" rel=\"noopener noreferrer\">Beaver Themer<\/a> 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&amp;drop principle like the BB pagebuilder.<\/p>\n<p>In the various facebook groups a lot of questions are asked whether or not Beaver Themer could work together with &#8216;the other&#8217; 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.<\/p>\n<h3>Smart combining<\/h3>\n<p><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/acf-pro.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-549\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/acf-pro.jpg\" alt=\"\" width=\"201\" height=\"81\" srcset=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/acf-pro.jpg 316w, https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/acf-pro-300x121.jpg 300w\" sizes=\"auto, (max-width: 201px) 100vw, 201px\" \/><\/a>It is a matter of smart combining of tools. The creation of a CPT can simply be done with a basic plug-in (<a href=\"https:\/\/wordpress.org\/plugins\/custom-post-type-ui\/\" target=\"_blank\" rel=\"noopener noreferrer\">Custom Post Type UI<\/a>) or even manually. Think twice before you do this manually. Adding some functionality to functions.php in your childtheme \u00a0<a href=\"https:\/\/code.tutsplus.com\/articles\/functionality-plugins-vs-themes--wp-26314\" target=\"_blank\" rel=\"noopener noreferrer\">isolates the CPT creation just for that theme<\/a>\u00a0(thanks <a href=\"https:\/\/www.facebook.com\/TheJayOkey\" target=\"_blank\" rel=\"noopener noreferrer\">Jay Okey<\/a> for the link). I you coded the CPT yourself (or via <a href=\"https:\/\/generatewp.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">GenerateWP<\/a> online tool), it is a better choice to embed\u00a0that little piece of code into a very small plug-in to make the creation of the CPT, theme independent.<\/p>\n<p><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/02\/logo-pods-header.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1464\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2017\/02\/logo-pods-header.png\" alt=\"\" width=\"180\" height=\"69\" \/><\/a>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 &#8216;fieldset&#8217; they offer and make your choice based on the requirements you need.\u00a0Advanced Custom Fields Pro offers the most extensive set of fieldtypes.<\/p>\n<blockquote><p>Investigate the way individual tools work together before using them in business solutions to get the required things done<\/p><\/blockquote>\n<p><a href=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/toolset-logo-72.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-550\" src=\"https:\/\/www.nieuwsmarkt.nl\/wp-content\/uploads\/2016\/08\/toolset-logo-72.png\" alt=\"\" width=\"72\" height=\"86\" \/><\/a>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 <a href=\"https:\/\/developer.wordpress.org\/themes\/basics\/template-hierarchy\/\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress template\u00a0hierarchy<\/a>. 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\u00a0Pods or Views to make the final output design. But don&#8217;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\u00a0one 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.<\/p>","protected":false},"excerpt":{"rendered":"<p>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.<\/p>","protected":false},"author":2,"featured_media":551,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,4],"tags":[60,73,74,72],"class_list":["post-1889","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-history","category-review","tag-acf","tag-pods","tag-themer","tag-toolset"],"_links":{"self":[{"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/posts\/1889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/comments?post=1889"}],"version-history":[{"count":3,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/posts\/1889\/revisions"}],"predecessor-version":[{"id":2005,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/posts\/1889\/revisions\/2005"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/media\/551"}],"wp:attachment":[{"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/media?parent=1889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/categories?post=1889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nieuwsmarkt.nl\/nl\/wp-json\/wp\/v2\/tags?post=1889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}