• How To Use ‘this’ Keyword in JavaScript

    ·

    Placeholder Icon

    The “this” keyword is an important and commonly-used feature of the JavaScript programming language. It is a special keyword that is used to refer to the current object or context in which a function is being executed. The value of the “this” keyword can change depending on how a function is called. For example, if…

    Read More

  • How to Add Scripts and Stylesheets in WordPress

    ,

    ·

    Placeholder Icon

    WordPress provides wp_enqueue_script and wp_enqueue_style function to add Scripts and Stylesheets in a systematic way. If you’re wondering why you should use these functions when you can simply load them in header or footer, here’s why – by adding JavaScripts that way, you increase the chance of conflicting with other scripts. Also, If we add our…

    Read More

  • How to Load jQuery in WordPress Footer

    ,

    ·

    Placeholder Icon

    By default, WordPress includes jQuery library with every installation. WordPress registers the jQuery library to load in header. But site performance wise, this is not always good. So, here we’ll see how we can load the jQuery in footer of our WordPress site. We can do this using a little snippet in our functions.php file. Let’s do…

    Read More

  • How To Add Multiple Custom Post Types Under One Menu Section In WordPress

    ,

    ·

    Placeholder Icon

    Custom Post Types are awesome! They make it insanely easy to add and manage contents. Whether you’re developing a theme or creating a WordPress site, there’s a very good chance that you’ll end up creating few custom post types. I always do. Recently, I developed a custom theme and as usual I added few custom…

    Read More

  • For, For in, For of and While Loops in JavaScript

    ·

    Placeholder Icon

    Loops are a fundamental control structure in JavaScript that provide a way to repeat a block of code multiple times. Loops are useful for working with collections of data, and provide a way to iterate over a sequence of items, such as an array or string, and perform some operation on each item. JavaScript provides…

    Read More

  • How to Use the Reduce Method on JavaScript Arrays

    ·

    Placeholder Icon

    One commonly used method on arrays in JavaScript is the reduce() method, which provides a powerful way to reduce the data in an array to a single value. The reduce() method is a callback method, meaning it takes a callback function as an argument, which is used to specify the logic to apply to the…

    Read More