Friday, April 17, 2026

Yoast SEO — Simple Guide

 


7

Yoast SEO is one of the most popular WordPress plugins used to optimize your website for search engines (Google) without needing deep technical knowledge.


πŸ”Ή What Yoast SEO Does

It helps you:

  • Improve your Google ranking
  • Add keywords (focus keyphrase)
  • Write better meta titles & descriptions
  • Check readability (easy-to-read content)
  • Generate XML sitemaps

πŸ”Ή Key Features Explained

✅ 1. SEO Analysis (Traffic Light System)

  • 🟒 Green = Good
  • 🟠 Orange = Needs improvement
  • πŸ”΄ Red = Poor

It checks:

  • Keyword usage
  • Headings
  • Internal links
  • Content length

✅ 2. Focus Keyphrase

You choose a keyword like:
πŸ‘‰ “best mobile under 20000”

Yoast checks if you used it in:

  • Title
  • URL
  • First paragraph
  • Headings

✅ 3. Meta Title & Description

This is what appears in Google search:

Example:

  • Title: Best Mobile Under 20000 in India (2026)
  • Description: Check top smartphones under 20K with best camera and battery.

πŸ‘‰ Yoast lets you preview this before publishing.


✅ 4. Readability Check

It improves:

  • Sentence length
  • Paragraph structure
  • Use of transition words

✅ 5. XML Sitemap

Automatically creates a sitemap so Google can easily index your site.


πŸ”Ή How to Use Yoast SEO (Step-by-Step)

  1. Install plugin:
    • Go to WordPress Dashboard → Plugins → Add New
    • Search Yoast SEO → Install → Activate
  2. Edit a post/page:
    • Scroll down to Yoast section
  3. Add:
    • Focus keyphrase
    • SEO title
    • Meta description
  4. Follow suggestions:
    • Try to get green signals

πŸ”Ή Pro Tips (Important)

  • Don’t stuff keywords (avoid overuse)
  • Write for humans first, then SEO
  • Use internal links
  • Keep paragraphs short

πŸ”Ή Free vs Paid

  • Free: Enough for beginners
  • Paid: More features like multiple keywords, internal linking suggestions

✔️ Simple Summary

Yoast SEO works like your SEO teacher inside WordPress — it tells you:

  • What to fix
  • How to rank better
  • How to write quality content

Saturday, April 11, 2026

7 Must-Have WordPress Plugins to Boost Your Website in 2026

Want to make your WordPress site faster, smarter, and more powerful? Plugins are the secret weapon that can transform a basic blog into a professional website—without coding.

Here are 7 must-have plugins every WordPress user should install πŸ‘‡


πŸš€ 1. Yoast SEO – Rank Higher on Google

Yoast SEO helps you optimize your content for search engines.

✅ Features:

  • Keyword optimization
  • Readability check
  • Meta tags control

🎨 2. Elementor – Design Like a Pro

Elementor lets you create beautiful pages using drag-and-drop.

✅ Perfect for:

  • Landing pages
  • Homepages
  • Custom layouts

⚡ 3. WP Super Cache – Speed Up Your Site

WP Super Cache improves loading speed.

πŸ’‘ Faster sites rank better on Google


πŸ”’ 4. Wordfence Security – Protect Your Website

Wordfence keeps hackers away.

✅ Features:

  • Firewall
  • Malware scan
  • Login protection

πŸ“© 5. Contact Form 7 – Easy Forms

Contact Form 7 helps you create simple contact forms.


πŸ“Š 6. MonsterInsights – Track Visitors

MonsterInsights connects your site with analytics.

πŸ“ˆ Understand:

  • Who visits your site
  • What content performs best

πŸ›’ 7. WooCommerce – Start Selling Online

WooCommerce turns your site into an online store.


πŸ–Ό️ Why Plugins Matter


Plugins help you:

  • Improve speed ⚡
  • Increase security πŸ”
  • Boost SEO πŸ“ˆ
  • Add powerful features πŸ’‘


Friday, July 12, 2024

CSS Counter Sets

 <!DOCTYPE html>

<html>

<head>

<style>

ol {

  counter-reset: section;

  list-style-type: none;

}


li::before {

  counter-increment: section;

  content: counters(section,".") " ";

}

</style>

</head>

<body>


<ol>

  <li>item</li>

  <li>item   

  <ol>

    <li>item</li>

    <li>item</li>

    <li>item

    <ol>

      <li>item</li>

      <li>item</li>

      <li>item</li>

    </ol>

    </li>

    <li>item</li>

  </ol>

  </li>

  <li>item</li>

  <li>item</li>

</ol>


<ol>

  <li>item</li>

  <li>item</li>

</ol>


</body>

</html>



====================Output========================









Tuesday, July 2, 2024

Easy Accordion with Plus/Minus Icons

 <!doctype HTML>

<html>

<head>

<meta content="text/html; charset=UTF-8" />

<title>Web Code Addict Accordion</title>

</head>

<body>

<div class="accordion_container">

    <div class="accordion_heading">First Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>First Accordian Body, it will have description</p>

    </div>

    <div class="accordion_heading">Second Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>Second Accordian Body, it will have description</p>

    </div>

    <div class="accordion_heading">Third Accordian Head<span class="plusminus">+</span>


    </div>

    <div class="accordion_content" style="display: none;">

        <p>Third Accordian Body, it will have description</p>

    </div>

</div>

</body>

</html>


/////////////////////////////////CSS///////////////////////////////////////////////////

.accordion_container {

    width: 500px;

}

.accordion_heading {

    background-color:skyblue;

    color: white;

    cursor: pointer;

    font-family: arial;

    font-size: 14px;

    margin: 0 0 1px 0;

    padding: 7px 11px;

    font-weight: bold;

}

.accordion_content {

    background: lightgray;

}

.accordion_content p {

    padding: 18px 5px;

    margin: 0px;

}

.plusminus {

    float:right;

}

/////////////////////////////////////////////Script/////////////////////////////

$(document).ready(function () {

  $(".accordion_heading").click(function () {

        if ($('.accordion_content').is(':visible')) {

            $(".accordion_content").slideUp(300);

            $(".plusminus").text('+');

        }

        if ($(this).next(".accordion_content").is(':visible')) {

            $(this).next(".accordion_content").slideUp(300);

            $(this).children(".plusminus").text('+');

        } else {

            $(this).next(".accordion_content").slideDown(300);

            $(this).children(".plusminus").text('-');

        }

    });

});

Thursday, June 27, 2024

Display Category Description on First Page only Woocommerce

 add_action( 'wp', function() {
    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    if ( 1 !== $page ) {
        remove_action( 'woocommerce_archive_description', 'shoptimizer_woocommerce_taxonomy_archive_description' );
        remove_action( 'woocommerce_archive_description', 'shoptimizer_category_image', 20 );
        // If you also want to remove the "Below category content" area:
        remove_action( 'woocommerce_after_shop_loop', 'shoptimizer_product_cat_display_details_meta', 40 );
    };
}, 20 );

Monday, June 10, 2024

How to add To cart and custom Quantity Field in Woo commerce with Plus and minus button

 Quantity Box With Add to Cart button

<form class="cart" method="post" enctype="multipart/form-data">

    <div class="quantity">

        <button type="button" class="minus" >-</button>

        <input type="number" step="1" min="1" max="" name="quantity" value="1" title="Quantity" class="input-text qty text" size="4" pattern="[0-9]*" inputmode="numeric">

        <button type="button" class="plus" >+</button>

    </div>

 <input type="hidden" name="add-to-cart" value="<?php echo get_the_ID(); ?>">

<button type="submit" class="single_add_to_cart_button button alt shop-button-cart"><i class="fa fa-cart-plus" aria-hidden="true"></i> Add to cart</button>

</form>


Script to make the Minus Plus button work for Quantity box

<script>

    jQuery(document).ready(function($){

   $('form.cart').on( 'click', 'button.plus, button.minus', function() {

            var qty = $( this ).closest( 'form.cart' ).find( '.qty' );

            var val   = parseFloat(qty.val());

            var max = parseFloat(qty.attr( 'max' ));

            var min = parseFloat(qty.attr( 'min' ));

            var step = parseFloat(qty.attr( 'step' ));

            if ( $( this ).is( '.plus' ) ) {

               if ( max && ( max <= val ) ) {

                  qty.val( max );

               } else {

                  qty.val( val + step );

               }

            } else {

               if ( min && ( min >= val ) ) {

                  qty.val( min );

               } else if ( val > 1 ) {

                  qty.val( val - step );

               }

            }

         });

    });

</script>

Monday, April 15, 2024

How to display category description on first page only?

add_action( 'wp', function() {

    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;

    if ( 1 !== $page ) {

        remove_action( 'woocommerce_archive_description', 'shoptimizer_woocommerce_taxonomy_archive_description' );

        remove_action( 'woocommerce_archive_description', 'shoptimizer_category_image', 20 );

        // If you also want to remove the "Below category content" area:

        remove_action( 'woocommerce_after_shop_loop', 'shoptimizer_product_cat_display_details_meta', 40 );

    };

}, 20 ); 

Thursday, April 4, 2024

How to allow Html Tags in category description area.

 foreach ( array( 'pre_term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_filter_kses' );
}
 
foreach ( array( 'term_description' ) as $filter ) {
    remove_filter( $filter, 'wp_kses_data' );
}

Monday, February 26, 2024

How to increase Logout session With AJAX in WordPress

function login_session_expired() {
// we only care to add scripts and styles if the user is logged in.
if ( is_user_logged_in() ) {

// add javascript file
wp_register_script( 'wp_auth_check', '/wp-includes/js/wp-auth-check.js' , array('heartbeat'), false, 1);
wp_localize_script( 'wp_auth_check', 'authcheckL10n', array(
'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
'interval' => apply_filters( 'wp_auth_check_interval', 1 * MINUTE_IN_SECONDS ), // default interval is 3 minutes
) );
wp_enqueue_script ('wp_auth_check');
// add css file
wp_enqueue_style( 'wp_auth_check','/wp-includes/css/wp-auth-check.css', array( 'dashicons' ), NULL, 'all' );
// add the login html to the page
add_action( 'wp_print_footer_scripts', 'wp_auth_check_html', 5 );
}
}
add_action( 'wp_enqueue_scripts', 'login_session_expired' );
// make sure the stylesheet appears on the lightboxed login iframe
function login_session_expired_styles() {
wp_enqueue_style( 'wp_auth_check','/wp-includes/css/wp-auth-check.css', array( 'dashicons' ), NULL, 'all' );
}
add_action( 'login_enqueue_scripts', 'login_session_expired_styles' );

Thursday, February 15, 2024

How to add Preloader in WordPress without plugin

Copy the following snippet code in functions.php

// WordPress Preloader by https://webcodeaddict.blogspot.com/

add_action( 'init', 'webcodeaddict_Preloader' );
function webcodeaddict_Preloader() { if(!is_admin() && $GLOBALS["pagenow"] !== "wp-login.php" ) {
$delay = 1; //seconds $loader = 'https://lh3.googleusercontent.com/drive-viewer/AEYmBYSOBFwcTqY5wcd0fQwWh9mOILRr9y6ximWsEzs72TKa3kxK3BIxm9wFtcpaSqJfiHOTTkD2EjsNKipAId8105QKAawYjQ=s1600'; $overlayColor = '#ffffff'; echo '<div class="Preloader"><img src="'.$loader.'" alt="" style="height: 150px;"></div> <style> .Preloader { position: fixed; top: 0; bottom: 0; left: 0; right: 0; background-color: '.$overlayColor.'; z-index: 100000; display: flex; align-items: center; justify-content: space-around; } </style> <script> document.body.style.overflow = "hidden"; document.addEventListener("DOMContentLoaded", () => setTimeout( function() { document.querySelector("div.Preloader").remove(); document.body.style.overflow = "visible"; } , '.$delay.' * 1000)); </script> '; }}

Monday, December 25, 2023

Code to Load more isotope Divis Using Jquery Ajax

 <script>

$(document).ready(function() {


$('.team-filters ul li a').click(function() {

$('.team-filters ul li a').removeClass('active');

$(this).addClass('active');


});


// var selector = $(this).attr('data-filter');

var $container = $('.isotope').isotope({

filter: $container,

itemSelector: '.element-item',

});


$('#filters').on('click', 'a', function() {

var filterValue = $(this).attr('data-filter');

// use filterFn if matches value

// filterValue = filterFns[filterValue] || filterValue;

$container.isotope({

filter: filterValue

});

});


$container.imagesLoaded(function() {

$container.isotope('layout');

});


// return false;



var initShow = 6;

var counter = initShow; 

var iso = $container.data('isotope'); 


loadMore(initShow); //execute function onload


function loadMore(toShow) {

$container.find(".hidden").removeClass("hidden");


var hiddenElems = iso.filteredItems.slice(toShow, iso.filteredItems.length).map(function(item) {

return item.element;

});

$(hiddenElems).addClass('hidden');

$container.isotope('layout');


//when no more to load, hide show more button

if (hiddenElems.length == 0) {

jQuery("#load-more").hide();

} else {

jQuery("#load-more").show();

};

}


//append load more button

// $container.after('<button id="load-more"> Load More</button>');


//when load more button clicked

$("#load-more").click(function(event) {

event.preventDefault();

if ($('#filters').data('clicked')) {

//when filter button clicked, set initial value for counter

counter = initShow;

$('#filters').data('clicked', false);

} else {

counter = counter;

};

counter = counter + initShow;

loadMore(counter);

});


//when filter button clicked

$("#filters").click(function() {

            // alert("sd;lk");

$(this).data('clicked', true);

loadMore(initShow);

});



});

</script>

Thursday, November 2, 2023

Woocommerce custom user redirect

 function wc_custom_user_redirect( $redirect, $user ) {
    // Get the first of all the roles assigned to the user
    $role = $user->roles[0];
    $dashboard = admin_url();
    $myaccount = get_permalink( wc_get_page_id( 'myaccount' ) );
    if( $role == 'administrator' ) {
        //Redirect administrators to the dashboard
        $redirect = $dashboard;
    } elseif ( $role == 'seller' ) {
        $redirect = site_url()."/dashboard";
    }elseif ( $role == 'sales' ) {
        //Redirect Sales team to the dashboard
        $redirect = $dashboard;
    }elseif ( $role == 'editor' ) {
        $redirect = home_url();
    } elseif ( $role == 'author' ) {
        $redirect = home_url();
    } elseif ( $role == 'customer' || $role == 'subscriber' ) {
        //Redirect customers and subscribers to the "My Account" page
        $redirect = $myaccount;
    } else {
        //Redirect any other role to the previous visited page or, if not available, to the home
        $redirect = wp_get_referer() ? wp_get_referer() : home_url();
    }
    return $redirect;
}
add_filter( 'woocommerce_login_redirect', 'wc_custom_user_redirect', 10, 2 );

Friday, October 13, 2023

Pause Iframe video on Pop up close button With jQuery

 Remove Iframe SRC attribute

jQuery('#cls-<?=get_the_ID(); ?>').click(function(){
jQuery("#popModal<?=get_the_ID(); ?>").hide();
jQuery("#popModal<?=get_the_ID(); ?> iframe").attr("data-src",jQuery("#popModal<?=get_the_ID(); ?> iframe").attr("src"));
                           jQuery("#popModal<?=get_the_ID(); ?> iframe").removeAttr("src");
                             jQuery("body").removeClass('popupOn');
                         });


Add Iframe SRC attribute                        

jQuery('#popBtn<?=get_the_ID(); ?>').click(function(e){
                             //jQuery("#popModal<?=get_the_ID(); ?> iframe").attr("src",jQuery("#popModal<?=get_the_ID(); ?> iframe").attr("data-src"));
                             //jQuery("#popModal<?=get_the_ID(); ?> iframe").removeAttr("data-src");
jQuery("#popModal<?=get_the_ID(); ?>").show();
                             jQuery("body").addClass('popupOn');
                         });

Thursday, September 14, 2023

How to add additional class to WordPress navbar anchors

 

//Function In function .php

function add_additional_class_on_a($classes, $item, $args)
{
    if (isset($args->add_a_class)) {
        $classes['class'] = $args->add_a_class;
    }
    return $classes;
}
add_filter('nav_menu_link_attributes', 'add_additional_class_on_a', 1, 3);

//Code for Header.php

 <?php

                $web_menu = wp_nav_menu(array(

                'theme_location' => 'menu-1',

                'menu_id' => 'primary-menu',

                'menu_class' => 'navbar-nav',

                'add_a_class' => 'nav-link', //Here is the class

                 'container' => 'ul',

                'echo' => false

            )

            );

            $web_menu = str_replace('menu-item', 'nav-item', $consult_menu);

                echo $web_menu ;

            ?>

Friday, September 1, 2023

What is WordPress Uses?

 In WordPress, "Users" refer to individuals who have access to your WordPress website's admin area. Each user account can have different roles and permissions, which determine their level of access and what they can do on the website. Managing user accounts is essential for controlling who can make changes to your site's content and settings. Here's an overview of WordPress users and user roles:

  1. User Roles:

    • Administrator: Administrators have full control over the WordPress site. They can add, edit, or delete content, install plugins and themes, manage other users, and change site settings. There can be multiple administrators.
    • Editor: Editors can create, edit, publish, and delete all types of content on the website, including posts, pages, and media. They cannot modify website settings or install plugins or themes.
    • Author: Authors can create, edit, publish, and delete their own posts. They do not have access to other users' content or settings.
    • Contributor: Contributors can write and edit their own posts, but they cannot publish them. They need an editor or administrator to review and publish their content.
    • Subscriber: Subscribers have the least access. They can only manage their user profile and receive email notifications about new content.
  2. Managing Users:

    • To manage users, log in to your WordPress Dashboard and go to "Users."
    • You can add new users, edit existing user profiles, change their roles, and reset passwords if necessary.
    • Be cautious when assigning roles. Only grant the level of access required for each user's responsibilities to maintain security.
  3. User Registration:

    • By default, WordPress allows users to register on your site. You can enable or disable user registration in the "General Settings."
    • Registered users can comment on posts, and you can also assign roles to new users upon registration.
  4. Multisite:

    • In WordPress Multisite, there are Super Admins who have control over the entire network, and there are site-specific admins for each sub-site within the network.
  5. User Profile:

    • Each user has a profile where they can edit their personal information, set their profile picture (avatar), and change their password.
  6. User Plugins:

    • WordPress allows you to extend user management through various plugins. For example, membership plugins can help restrict content to specific user groups, and social login plugins allow users to log in with their social media accounts.

User management is crucial for ensuring the security and integrity of your WordPress website. By assigning appropriate roles and permissions to users, you can maintain control over who can create, edit, and manage content while keeping your site protected from unauthorized changes.

Yoast SEO — Simple Guide

  7 Yoast SEO is one of the most popular WordPress plugins used to optimize your website for search engines (Google) without needing deep ...