Load More Post Or Infinite Scroll For A Single Post In WordPress

Load More Post Or Infinite Scroll For A Single Post In WordPress

Posted on

In this blog, we will learn about how to create a load more posts feature for a single post page in WordPress. Create a nonce and pass it to the JavaScript file, so it can be verified. We will create a function that renders the template with load more button. Create a function that verifies

Read More

Connect Python To MySQL Database With Pymysql And PhpMyAdmin.

Connect Python To MySQL Database With Pymysql And PhpMyAdmin.

Posted on

If we already have a PhpMyAdmin workbench, we can not only connect PHP but also Python to a MySql Database. In this blog, we are going to use the following tools and packages. PyCharm — A Python IDE MAMP — A local development environment. ( You can also use XAMP ) PhpMyAdmin — MySQL Workbench. Pymysql module — A

Read More

Advance To A Particular Slick Slide or Center using slickGoTo

Advance To A Particular Slick Slide or Center using slickGoTo

Posted on

In this blog, we will learn how to advance to a particular slide using slick carousel’s slickGoTo method. Step 1: Get the carousel Element and all the slide items. Step 2: Now get the current Slide. Step 3: Now using the currentSlideIndex move the carousel item position to the current index. Please note that this will always keep the

Read More

Dynamically populate a select field’s choices for Custom Post Types— ACF

Dynamically populate a select field’s choices for Custom Post Types— ACF

Posted on

Adding the dynamic select field choices in Advanced Custom Fields can be challenging, as ACF does not offer this feature by default. In this blog, we will discuss to do just that. Register a custom field with name ‘post_type_selection’ and field type ‘Select’ Now let’s write the PHP code as described above. Notice that, we

Read More

Create Data Table Block With ACF, dataTables, And Sticky First Column

Create Data Table Block With ACF, dataTables, And Sticky First Column

Posted on

In this blog, we will learn about how to create a data table block with ACF. I am assuming you have the ACF pro plugin. This table will allow you to sort the data, as well as the first column, will be sticky. Register ACF Data Table Block Let’s register our block first. Create Custom

Read More

Build Multiple Gutenberg Blocks Using block.json | Custom SVG Icon For Blocks

Build Multiple Gutenberg Blocks Using block.json | Custom SVG Icon For Blocks

Posted on

In this blog, we will learn about how to build multiple custom Gutenberg blocks with the new convention of using block.json. Create Files for Style and Script Create a file called index.js and index.css in test-block directory. Creating block.json file Create a file called block.json and define all the properties. Register Block Client side. Place

Read More

Maintaining A 16:9 Responsive Aspect-Ratio Of An Image Using CSS

Maintaining A 16:9 Responsive Aspect-Ratio Of An Image Using CSS

Posted on

One of the greatest challenges developers face is to maintain an aspect ratio of multiple images with unknown dimensions. In this blog, we will learn just that. Let’s take an example of these two images with different dimensions. The problem is that we cannot give it a fixed height because the width will change in

Read More

Saving the ACF JSON locally to your plugin or theme file | Save, Load and Sync Advanced Custom Fields JSON

Posted on

Saving the ACF JSON files locally allows you to have version control over your field settings! Let’s learn how to do that. Create an acf-json directory Create a directory called acf-json in your plugin. Save the JSON Add the following in your functions.php file Now when you hit save/update for each ACF Group , it is going

Read More