{"id":17286,"date":"2025-07-11T13:38:23","date_gmt":"2025-07-11T13:38:23","guid":{"rendered":"https:\/\/rapyd.cloud\/blog\/?p=17286"},"modified":"2025-12-22T09:37:17","modified_gmt":"2025-12-22T09:37:17","slug":"no-code-logic-building-smarter-with-crocoblock","status":"publish","type":"post","link":"https:\/\/rapyd.cloud\/blog\/no-code-logic-building-smarter-with-crocoblock\/","title":{"rendered":"From Custom Code to No-Code Logic: Building Smarter with Crocoblock"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>If you are creating a complex, highly dynamic website or just a project that requires more than the default WordPress post types, relations, and taxonomies, you will definitely need extra functionality that not only adds some particular fields or logic, but also enhances the way the website stores, fetches, and displays content.&nbsp;<\/p>\n\n\n\n<p>It can be achieved using a ton of different custom code snippets, or there\u2019s a modular solution that does the job for you, but you don\u2019t have to code \u2013 <strong><a href=\"https:\/\/rapyd.cloud\/blog\/crocoblock-review\/\" title=\"Crocoblock suite\">Crocoblock suite<\/a><\/strong> with its central and incredibly powerful plugin \u2013 JetEngine.&nbsp;<\/p>\n\n\n\n<h2 id=\"when-custom-hooks-are-not-the-solution\" class=\"wp-block-heading\">When Custom Hooks Are Not the Solution<\/h2>\n\n\n\n<p>When mentioning \u201ccustom code,\u201d I don\u2019t mean quite harmless CSS custom rules, but PHP functions or PHP + JavaScript solutions hooked into WordPress to control behavior, output, or dynamic interactions. However, hooks are not as bad, if not overused, but the worst scenario is hardcoding theme files directly.&nbsp;<\/p>\n\n\n\n<p>Writing such custom code snippets might seem like a flexible solution, but it often comes with hidden drawbacks. They can conflict with plugins or theme updates, break silently when WordPress changes its core behavior, and are harder to debug, especially when multiple snippets interact in unexpected ways. Maintaining them over time becomes a burden, especially in larger projects or when working in teams. Plus, what starts as a \u201cquick fix\u201d often turns into a tangled mess that&#8217;s difficult to scale or hand over to another developer.<\/p>\n\n\n\n<p>Let\u2019s talk about such drawbacks more specifically.<\/p>\n\n\n\n<h2 id=\"drawbacks-of-custom-code-snippets\" class=\"wp-block-heading\">Drawbacks of Custom Code Snippets<\/h2>\n\n\n\n<p>Using custom PHP or JavaScript snippets in WordPress is a common way to add dynamic functionality, but it\u2019s not always the best long-term approach. Here\u2019s why:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Conflicts and compatibility issues<\/strong> can arise, as custom code can easily clash with plugins, themes, or even core WordPress updates. What works today might silently break tomorrow.<\/li>\n\n\n\n<li><strong>Debugging <\/strong>gets complicated because when something goes wrong, it\u2019s not always obvious which snippet is the culprit. Especially in projects where multiple devs have added logic over time.<\/li>\n\n\n\n<li><strong>Poor scalability<\/strong>. As your project grows, what started as a simple piece of code can turn into an unmanageable web of dependencies and conditionals.<\/li>\n\n\n\n<li><strong>Not easy to maintain<\/strong> and client-friendly. If you&#8217;re handing the project off to a client and their maintenance team is less technical or just can\u2019t track all your custom snippets, it will be a big issue if something needs to be changed.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>As you can see, tweaking WordPress functionality using code snippets is not really a sustainable solution, unless it\u2019s just a couple of things to be changed. And, if such a need arises, here are some recommendations.<\/p>\n\n\n\n<h2 id=\"what-if-you-still-need-some-custom-code\" class=\"wp-block-heading\">What If You Still Need Some Custom Code?<\/h2>\n\n\n\n<p>Sometimes, custom code is unavoidable, especially for very specific functionality that no plugin covers. In that case, here\u2019s how to do it right:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If your snippet relies on specific plugins, post types, or user roles, clearly indicate this in the <strong>code comments,<\/strong> <strong>readme file, or website documentation<\/strong>.<\/li>\n\n\n\n<li>Use <strong>dedicated plugins<\/strong> for code snippets, so you can clearly see what is working under the hood, debug, and deactivate them.<\/li>\n\n\n\n<li>Wrap bigger code chunks into <strong>custom plugins<\/strong> instead of dumping snippets into functions.php. This keeps your logic separate from the theme, making it portable and avoiding accidental loss during theme updates.<\/li>\n\n\n\n<li>Stick to WordPress best practices and use <strong>actions and filters<\/strong> <strong>(hooks)<\/strong> instead of hardcoding things into templates. This keeps your code flexible and easier to troubleshoot.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"meet-the-crocoblock-tools-no-code-powerful-solution-for-dynamic-websites\" class=\"wp-block-heading\">Meet the Crocoblock Tools: No-Code Powerful Solution for Dynamic Websites<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdoCLLJQQDkZi1V_WE1YD7Zp05umHaJYt_6BMA28iUznJ2S6Pv3QmwMm0idTGCW0FExyS4yxhEJZvYwNcQzhvqHZa1mIwq4wr41rdnFcds4UhWrRPIEm2ZMi_jIcWLDWy6QBvMQ9g?key=BpZNX4pqn3kVyQw9dRWEdQ\" alt=\"\"\/><\/figure>\n\n\n\n<p><a href=\"https:\/\/crocoblock.com\/plugins\/\">Crocobloc suite<\/a> is 20 plugins plus the JetFormBuilder form plugin. All of them have an accent on dynamic content. Most of the plugins are premium and can be purchased separately; however, the most profitable method is to opt for the All-Inclusive plan, which costs $199 per year for one site and $399 for unlimited sites. Lifetime deals are also available.&nbsp;<\/p>\n\n\n\n<p>Most of the plugins are made for dynamic content, filtering, bookings, and forms that work with the Block Editor, Elementor, and Bricks. In the future, Divi compatibility will also be available. And, there are also Elementor add-ons that extend the builder\u2019s functionality.&nbsp;<\/p>\n\n\n\n<p>The key plugin that adds a lot of functionality under the hood is <strong>JetEngine <\/strong>\u2013 it\u2019s, as the name suggests, comparable to the powerful jet engine that puts your website on steroids. The module system, which allows you to switch components on and off, makes the website lightweight, plus, the Performance settings provide full control over builder-support loading.&nbsp;<\/p>\n\n\n\n<p>And, of course, it has seamless compatibility with the rest of the plugins, extending their functionality. Using it, you can create custom post types, custom fields, taxonomies, relations, or compact content types called Custom Content Types that are perfect for a performance boost.<br>But the uniqueness of this plugin comes at the point when the data should be queried \u2013 the unique Query Builder tool can do it for you using a friendly visual UI.&nbsp;<\/p>\n\n\n\n<p>Then, to display it on the front end, you can use the template editor and your favorite builder, from Elementor or Bricks, to the Block Editor or even Twig, if you prefer the lightest DOM structure. There are calendars, tables, sliders, and maps available to display your content on the front end with no effort.&nbsp;<\/p>\n\n\n\n<p>Not to mention that JetEngine\u2019s REST API functionality offers more features than even dedicated premium plugins.&nbsp;<\/p>\n\n\n\n<p>This is just <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/\">JetEngine<\/a>, and I will talk more about the details later.&nbsp;<\/p>\n\n\n\n<p>But there are more plugins: the feature-rich JetFormBuilder, powerful and user-friendly JetSmartFilters, JetBooking and JetAppointment for flexible booking functionality, JetSearch offers flexible and controllable search functionality, JetThemeCore is responsible for Theme Building for Elementor and Block Editor, JetWooBuilder will help you to edit Elementor WooCommerce templates, and much more in the full Crocoblock toolkit.&nbsp;<\/p>\n\n\n\n<p>So, here are some of the use cases when custom code can be easily replaced by the fully visual functionality of Crocoblock plugins.<\/p>\n\n\n\n<h2 id=\"modifying-woocommerce-templates-in-elementor\" class=\"wp-block-heading\">Modifying WooCommerce Templates in Elementor<\/h2>\n\n\n\n<p><em>Crocoblock plugins involved: JetWooBuilder, JetThemeCore (optional)<\/em><\/p>\n\n\n\n<p>While WooCommerce is a very powerful tool, it lacks flexibility in template editing, and to hide or move some sections in any of its templates, you will need to write a hook to first hide it, then (if you move it), display it but with another priority. In case you want to change the visual appearance of elements, you will have to find their CSS classes and add custom CSS to make the changes. But if you want to add animation or change behaviour requiring JavaScript, you have to be careful and make sure that the script will not affect other elements.&nbsp;<\/p>\n\n\n\n<p>Here is where <strong>JetWooBuilder <\/strong>comes to the rescue \u2013 it\u2019s a more in-depth and flexible solution than the similar functionality of Elementor Pro, not to mention that, if you use free Elementor, this functionality is not available.&nbsp;<\/p>\n\n\n\n<p>For example, this is the code you need to move the \u201cAdd to Cart\u201d button a bit higher and place it under the title:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* Unassign the old priority *\/\nremove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 ); \n\n\/* Assign the new priority *\/ \nadd_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 6 );\n<\/code><\/pre>\n\n\n\n<p>With JetWooBuilder, you can do it just by dragging and dropping elements wherever you want them to be.&nbsp;In combination with <a href=\"https:\/\/crocoblock.com\/plugins\/jetthemecore\/\"><strong>JetThemeCore<\/strong><\/a>, you can also add custom headers and footers and different templates for particular user roles, devices, query variables, etc.<\/p>\n\n\n\n<h2 id=\"fetching-any-content-from-wordpress-database\" class=\"wp-block-heading\">Fetching Any Content From WordPress Database<\/h2>\n\n\n\n<p><em>Crocoblock plugins involved: JetEngine<\/em><\/p>\n\n\n\n<p>Let\u2019s say I have the Event custom post type, and want to fetch values of custom fields \u201cdate,\u201d \u201cevent name,\u201d and \u201cevent description.\u201d It\u2019s a very simple query, just for demonstration, but this is how it looks as a code based on the WP_Query PHP class:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXded-ZHGKzUeAPmdMhzg08blkDrTx36n2Mnt5l9vJmNvY-BYH0vGDpHxtmwFitMzyiNNXmNYghb4dGfdIQ5WNP55pI6cFd_39LfIZtvJG-tg0aW7GwoX2rQ00Zt1WyStDz1tSSMPg?key=BpZNX4pqn3kVyQw9dRWEdQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>To show the data on the front end, I can wrap the code in a shortcode and use HTML containers around each field so I can style them later with CSS.<\/p>\n\n\n\n<p>But what if I want to show only events by a specific author? Or filter them by category, or display only the ones where a certain custom field has a specific value? That\u2019s where it starts getting tricky. I\u2019d need to write a new custom query for every case, and those queries can get long and messy fast. Plus, I wouldn\u2019t be able to control anything from the WordPress dashboard. Every time something changes, I\u2019d have to go back to the code.<\/p>\n\n\n\n<p>Sure, page builders like Elementor Pro or Bricks let you show posts and users with some filtering, but they hit a wall when things get more complex. For example, if I want to get a list of users who published something last week, or people with birthdays coming up next month, or if I want to filter inside repeater fields, that\u2019s not something WP_Query can easily handle. And at that point, I\u2019d need to write raw SQL.<\/p>\n\n\n\n<p>That\u2019s exactly where JetEngine\u2019s Query Builder comes in. It lets you build those complex queries visually \u2013 combine different conditions, filter by anything you want, set the sort order, and even create multi-layered queries without touching code.&nbsp;<\/p>\n\n\n\n<p>After querying, you don\u2019t have to worry about HTML and CSS \u2013 there\u2019s a visual Listing Templates builder, so you can design every loop element and then display it as a grid, list, table, calendar, slider, or on the map.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfEPk1oPY0H5mSCk3D45B10eTGe6zicC_OUwDquVIOjvpLQWIBkRE-hiQY2OjNs2gPiMHO8X7Y-AsIEaD44l8aWk5OzBiI6ZYUVDQkX4734Sg6pgAIL8MJi7lPfmsahu9fllF0dDA?key=BpZNX4pqn3kVyQw9dRWEdQ\" alt=\"\"\/><\/figure>\n\n\n\n<h2 id=\"collecting-data-from-different-websites-on-one-site-using-rest-api\" class=\"wp-block-heading\">Collecting Data From Different Websites on One Site Using REST API<\/h2>\n\n\n\n<p><em>Crocoblock plugins involved: JetEngine, JetFormBuilder<\/em><\/p>\n\n\n\n<p>Imagine a scenario where several websites are collecting registration data for an event using forms, and all that data needs to be gathered and displayed on a central website. Why use multiple sites instead of redirecting users to one? There are plenty of practical reasons \u2014 separate campaigns with unique user flows, regional discounts, or different language and location-specific versions.<\/p>\n\n\n\n<p>In this setup, you have a <strong>Central <\/strong>site (where the data is collected and displayed) and sites <strong>A<\/strong> and <strong>B<\/strong> (where users submit their registrations). The communication between them is handled via the REST API. And even today, if you want to build something this connected and dynamic, you&#8217;re still going to need custom code.<\/p>\n\n\n\n<p>This is an example of code just to send data from sites A and B, where you should connect the submit event of your form so it would trigger the sending process:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfddkgjWVUjJvOLGtorpI4CLRoaAqfWsfbZTHMkiemNGn0XFZVeicBtD7KqUVXo0DHP9NDHDRL80sP3344wHAunjc7q0uuq_3sR7mq0Bhbpx40DhrXgbbVWaS8fwPSu3RChuMd2?key=BpZNX4pqn3kVyQw9dRWEdQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>Then you will need twice as many lines of code to register a REST API endpoint on the Central site and, finally, write a query to fetch it and then somehow display it on the front end.&nbsp;<\/p>\n\n\n\n<p>There\u2019s also an additional layer of coding and testing to control security, so your website would not receive some random spam instead of registrations.&nbsp;<\/p>\n\n\n\n<p>Goot news that JetEngine <a href=\"https:\/\/crocoblock.com\/blog\/jetengine-rest-api-new-features-and-use-cases\">can handle it fully visually<\/a>, in <strong>three simple steps<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On the Central site, create a \u201cParticipants\u201d CCT (custom content type that stores data on a separate DB table, not to bloat your wp_posts table) and switch the REST API endpoint toggle to the ON position \u2013 you will get the endpoint URL generated. You can configure security settings right there.&nbsp;<\/li>\n\n\n\n<li>On the A and B sites, create JetFormBuilder forms. Choose REST API Request on the post-submit actions on the form settings, and paste the endpoint URL from the Central site.&nbsp;<\/li>\n\n\n\n<li>Congrats! The form records will be saved on the Central website in the \u201cParticipants\u201d CCT, which you can display on the front end by creating a Listing Template by JetEngine fully visually.&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>There\u2019s a second way to display, not only form submission, but any data from website A on website B. On the website B, go to <strong>JetEngine &gt; JetEngine<\/strong> and open the REST API tab. There, insert the API endpoint for the post type from site A that you want to display on site B. For example, you have \u201cDoctors\u201d post type on website A. The URL will be:<br><\/p>\n\n\n\n<p><a href=\"https:\/\/website-A.com\/wp-json\/wp\/v2\/doctor\">https:\/\/website-A.com\/wp-json\/wp\/v2\/doctor<\/a><\/p>\n\n\n\n<p>Insert it there, adjust the security, and test the connection.<\/p>\n\n\n\n<p>Then, go to <strong>JetEngine &gt; Query Builder<\/strong> and choose the REST API query type (yes, you can query even data from remote sites using Quethe ry Builder) and define what exactly you want to display \u2013 you can choose among all available fields.&nbsp;<\/p>\n\n\n\n<p>And, finally, create a Listing Template based on this query.<\/p>\n\n\n\n<h2 id=\"other-cases-when-you-dont-need-to-code-if-you-have-crocoblock\" class=\"wp-block-heading\">Other Cases When You Don\u2019t Need to Code If You Have Crocoblock<\/h2>\n\n\n\n<p><strong>Show or hide blocks based on user status or role, device, time of the day, time period, etc.<\/strong><br>Use <a href=\"https:\/\/www.youtube.com\/playlist?list=PL26jaHWVtLFyay_zj-NFxi0MgxEYdYIYw\">JetEngine\u2019s Dynamic Visibility<\/a> to control whether a section appears based on whether the user is logged in, has a specific role, or even based on their custom meta fields \u2013 no PHP <em>IF <\/em>statements or role checks needed.<br>In case you want conditional visibility on the post level (header, body, footer), use a variety of conditions by JetThemeCore.<\/p>\n\n\n\n<p><strong>Display different form steps or fields depending on user input<\/strong> with <a href=\"https:\/\/jetformbuilder.com\/\">JetFormBuilder<\/a> Conditional Block. You can make certain fields or entire sections of a form appear only when specific conditions are met.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create posts, register users, call webhooks to connect third-party services, or custom hooks on your website, register or remove relations on post submit, <strong>thanks to the big list of post-submit actions by JetFormBuilder<\/strong>.<br><\/li>\n\n\n\n<li>Use the <strong>Context feature<\/strong> \u2013 you can use any of the Listing Templates and add Context (e.g., Current User, Current Query), etc., to show specific data. Normally, it takes custom-coded PHP&nbsp; templates to specify the context.&nbsp;<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Dynamic tables with post meta fields or WooCommerce products<\/strong>. Crocoblock offers two solutions for building dynamic tables \u2013 one is the JetEngine\u2019s module, and your table will be based on a Query Builder query, which, as you already know, can fetch any data. You can also add buttons and even create templates for each table cell.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><br>There\u2019s also a <strong>JetProductTables <\/strong>plugin specifically for WooCommerce to create tables listing products or product variation tables easily. Buttons and sorting functionality are available.<br><br><strong>AI Website Structure Builder<\/strong>. This tool by JetEngine gets your prompt and, based on it, builds website structures: in under one minute, creates custom post types, custom fields, posts, and user relations, and AJAX-based filters by JetSmartFilters. You can re-prompt if you don\u2019t like the result, and, of course, you can edit everything, having access to everything from one dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXfqx040ULCrxyWSHhNbbjH8YJRwWPDpWOrdVaNC5lx0brdr_VOvQS5TqnrYV5k2Mmwq5NnSk_IgM3HxccP4YATmdGgwdQWQKWqSjiI2F4b0gxfv90ZwlzrqIg81vnfEb7fJDVETSw?key=BpZNX4pqn3kVyQw9dRWEdQ\" alt=\"\"\/><\/figure>\n\n\n\n<h2 id=\"takeaway\" class=\"wp-block-heading\">Takeaway<\/h2>\n\n\n\n<p>Using some custom code snippets can be handy, but only up to a point. When your site starts relying on too many of them, it\u2019s worth asking if there\u2019s a better, more solid solution out there. Crocoblock plugins give you the flexibility and power to build almost any kind of site&nbsp; \u2013 from membership portals to booking systems and custom dashboards, without drowning in code.<\/p>\n\n\n\n<p>That said, if your site has lots of content and heavy database queries, you\u2019ll definitely want a fast, reliable hosting provider like Rapid Cloud. Even the most powerful dynamic site can struggle with performance and SEO if its Core Web Vitals aren\u2019t up to par.<\/p>\n","protected":false},"excerpt":{"rendered":"If you are creating a complex, highly dynamic website or just a project that requires more than the&hellip;\n","protected":false},"author":21,"featured_media":17397,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","om_disable_all_campaigns":false,"_eb_data_table":"","csco_post_fleet_bg_color":"","csco_post_fleet_image_id":17397,"csco_post_fleet_text_color":"","full_width_enabled":false,"csco_singular_sidebar":"","csco_page_header_type":"fleet","csco_header_bg_color":"","csco_appearance_masonry":"","csco_page_load_nextpost":"","csco_post_video_location":["full-header"],"csco_post_video_location_hash":"0rolrat1v92qmjgy9lit","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0,"footnotes":""},"categories":[40],"tags":[],"class_list":{"0":"post-17286","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-website-development","8":"csco-post-header-type-fleet","9":"cs-entry","10":"cs-video-wrap"},"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/posts\/17286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/comments?post=17286"}],"version-history":[{"count":4,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/posts\/17286\/revisions"}],"predecessor-version":[{"id":17299,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/posts\/17286\/revisions\/17299"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/media\/17397"}],"wp:attachment":[{"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/media?parent=17286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/categories?post=17286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rapyd.cloud\/blog\/wp-json\/wp\/v2\/tags?post=17286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}