Open in app

Sign In

Write

Sign In

Imran Sayed
Imran Sayed

619 Followers

Home

About

Sep 5, 2022

Setup And Run Cypress Tests With Your WordPress Plugin

In this blog, we will learn how to setup and run Cypress test with your WordPress plugin. Source Code: (for smart people 😉) https://github.com/imranhsayed/aquila-features/pull/7 In this blog, we will learn how to setup and run Cypress test with your WordPress plugin. Step 1: Install Cypress( Assuming you already have a…

Cypress

3 min read

Setup And Run Cypress Tests With Your WordPress Plugin
Setup And Run Cypress Tests With Your WordPress Plugin
Cypress

3 min read


Dec 27, 2021

Check If A User Or Author Has Avatar In WordPress And Set User Image With First Letter As Default

Sometimes we do not want WordPress to display the default avatar. There isn’t a WP core function to check that. So we will create one. We will also learn how to add the first letters of the user’s first name and last name as a fallback avatar picture using JavaScript.

Has Avatar

4 min read

Check If A User Or Author Has Avatar In WordPress And Set User Image With First Letter As Default
Check If A User Or Author Has Avatar In WordPress And Set User Image With First Letter As Default
Has Avatar

4 min read


Dec 23, 2021

Adding Offset With Limit To wp_get_archives for pagination.

In this blog, we will learn about how to add the offset and the limit for pagination. In this example, we are showing this for monthly archives, but you can do it similarly for the daily and yearly as well. function get_custom_monthly_archives( $args = []) { global $wpdb…

Wp Get Archives

2 min read

Wp Get Archives

2 min read


Dec 22, 2021

Create Custom Post Type Search Result Page In WordPress

In this blog, we will learn about how to create a custom post-type search result page in WordPress. We need to take the following steps: Create a custom search page template ( {custom-post-type}-search.php ) Load your template using ‘template_include’ filter Create a custom search form template ( {custom-post-type}-searchform.php ) Step One — Custom Search Page Template Create…

Custom Post Type

3 min read

Create Custom Post Type Search Result Page In WordPress
Create Custom Post Type Search Result Page In WordPress
Custom Post Type

3 min read


Dec 22, 2021

Adding Scroll To Top In WordPress Site

In this blog, we will learn about how to add a scroll to the top button in WordPress Site. Scroll To Top Button Add the scroll to top button in footer.php Note that some of the classes I am using are from tailwindcss <div id="footer-wrapper" class=" text-white footer-wrapper"> <footer id="colophon" class="site-footerpt-50px pb-43px…

Scrolltop

5 min read

Scrolltop

5 min read


Dec 20, 2021

Apply Different CSS Styles Based On Window Size (Responsively) Without Using JavaScript Window Event

Switching CSS classes or properties based on screen size can be achieved using JavaScript as shown below. But handling such things with JavaScript window resize event is not as efficient to achieve it with CSS. $(window).on('resize', function() { if($(window).height() > 400) { $('#body').addClass('your-class'); $('#body').removeClass('your-class'); }else{ $('#body').addClass('your-class-2'); $('#body').removeClass('your-class-2'); } })

CSS

2 min read

CSS

2 min read


Dec 10, 2021

Adding Local Fonts or Google Fonts In Tailwind CSS With WordPress

In this blog, we will learn about how to add local fonts in TailwindCSS. There are several reasons why you should include fonts locally. Watch this video to know more. Step 1: Download the Fonts Locally Use Google Fonts helper google webfonts helper A Hassle-Free Way to Self-Host Google Fonts. Get eot, ttf, svg, woff and woff2 files + CSS snippets!google-webfonts-helper.herokuapp.com Place the fonts into the fonts directory.

Tailwind Css

2 min read

Adding Local Fonts or Google Fonts In Tailwind CSS With WordPress
Adding Local Fonts or Google Fonts In Tailwind CSS With WordPress
Tailwind Css

2 min read


Dec 10, 2021

Change the Archive Link Structure And Add Rewrites For Custom Post Type In WordPress

In this blog, we will learn about how to change the URL structure and add rewrites for Custom Post Type Archive Pages Let’s add re-writes, <?php /** * Date Archive Redirect For CPT. * */ namespace YourNameSpace; add_action( 'init', function() { /** * Day Archive Rewrite Rule * *…

Archive

2 min read

Archive

2 min read


Dec 1, 2021

Get Archive URL In Array Format With wp_get_archives And Regex

In this blog, we will learn how to extract just the monthly archive URL/path , instead of markup. function get_monthly_archive_array() { $years = []; $years_args = [ 'type' => 'monthly'…

Wp Get Archives

1 min read

Get Archive URL In Array Format With wp_get_archives And Regex
Get Archive URL In Array Format With wp_get_archives And Regex
Wp Get Archives

1 min read


Nov 30, 2021

Adding Rewrite Rules In WordPress Tutorial

In this blog, we will learn about how to create rewrite rules in WordPress. The problem Let’s say we want to have a monthly archive page for a term. WordPress has a term archive page, which is /{taxonomy}/{term}/ , but does not have a monthly archive page for that term. …

Rewrite Rule

3 min read

Adding Rewrite Rules In WordPress Tutorial
Adding Rewrite Rules In WordPress Tutorial
Rewrite Rule

3 min read

Imran Sayed

Imran Sayed

619 Followers

👤 Full Stack Developer at rtCamp, Speaker, Blogger, YouTuber, Wordpress, React, Node, Laravel Developer http://youtube.com/ImranSayedDev

Following
  • Dale Nguyen

    Dale Nguyen

  • Rachel Reilly

    Rachel Reilly

  • Kitze

    Kitze

  • Mahvash Fatima

    Mahvash Fatima

  • Ratan Oberoi

    Ratan Oberoi

See all (11)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams