Author: imranhsayed
-
Saving the ACF JSON to your plugin or theme file.
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 Save the JSON Add the following in your functions.php file Now when you hit save/update for each ACF Group , it is going to generate a local JSON copies…
-
How To Restrict WordPress Search to Titles Only
In this blog we will learn about how to restrict WordPress to search by title only. We can hook into WordPress using `posts_where` hook and then modify the query to search by post title using `post_title LIKE` You can watch the above video for the demo.
-
Maintaining A 16:9 or 1:1 Responsive Aspect-Ratio Of An Image Using CSS
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…
-
Adding Clean SVG Markup Using Use SVG In WordPress
This blog talks about adding clean SVG Markup using Use-SVG in WordPress Firstly, lets put all the svgs in a template, giving each on an id e.g. `id=”icon-hamburger-menu”` Now add this CSS Now in your footer.php, include that template. The included svgs will beadd these into the footer Now you can use it in any…
-
WP_Query To Get Custom Posts Type Posts By A Taxonomy Term With Fallback Posts
This blog will demonstrate how to make a WP_Query to get 5 posts of a custom post type by a taxonomy term and if we don’t have enough, then we fill the remaining slot using default posts as a fallback. That’s all folks!
-
Create Infinite Scroll In WordPress With AJAX Request — Custom Code Without A Plugin.
In this blog, we will learn about the infinite scroll. We will also add pagination for Google, which will be hidden for users. Let’s take a brief look at the steps required: Create None for Security and Enqueue Scripts Let’s Create a nonce for AJAX request and pass the nonce to our JavaScript file which…
-
How to Book the Best Dummy Flight Ticket for Visa Applications & Onward Travel | BestOnwardTicket Review
Traveling internationally often involves more than just packing your bags and booking your hotel. One major challenge travelers face — especially those applying for visas — is the requirement to show proof of onward travel or a return ticket. But what if you haven’t finalized your plans yet? Or you’re not ready to commit to an expensive flight…
-
Creating ICal For Custom Post Type In WordPress Without A Plugin.
In this blog, we will learn about how to add an ical feature in WordPress without a plugin. Define the following constant in your functions.php Create a file called ical.php and include it in your functions.php Then to include the link for downloadable `Ical`, use the following. Now click on that link it will download a .ics file. Click on…
-
Dynamically populate a select field’s choices for Custom Post Types— ACF
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…
-
Advance To A Particular Slick Slide or Center using slickGoTo
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…