• How to Create Multiple Headers & Footers in WordPress

    By default, the WordPress header and footer are typically the same on every page of the site. But what happens when you want to create a landing page with a simplified version of both the header and footer? Or when you want to construct a brand new header but don’t want the public to see it until you are done? By using multiple headers and footers we can quickly and easily solve these problems. This post will walk you through the steps for creating multiple headers and footers on your very own WordPress site! Step One: Duplicate your header.php file and name it header-new.php. You can replace the word new with something that makes sense for your website. Step Two: Open up the Page.php file associated with the template that you want to use. Then replace the normal header code with the code below. Update the page…

    ...
    PHP,  Wordpress
  • A loop inside a loop in PHP

    PHP Nested Loop

    Nested loops in PHP In This article we will talk about nested loops in PHP. A loop inside another loop is called a nested loop. Below we give some examples for illustrating the concept of nested loops and the convenience of their use. Nested WHILE loop in PHP: This cycle repeats WHILE our condition is true and checks the value with each pass at the beginning of the cycle, and if the condition is not true, the cycle will not be executed even once. Syntax of the while loop inside the while loop: An example of a nested while loop: output : i am programmer i am programmer i am programmer i am programmer Nested Do While loop in php The Do While loop is different from the While loop by one feature, it checks the truth of the expression…

    ...
    PHP
  • How to run php in javascript

       Topics with a title like this, I’m  often found on forums for programmer. And of course the beginners in web development is most interested in this.    We all studied, and the best step is to ask a professional about it, although on the forums in the Rf, the answer is given, after insults of the topic starter. PHP runs inside JS, and does it successfully, which is very often I used in my practice. Here is PHP and JS code example , probably the most relevant. First we have PHP inside HTML, then JavaScript inside PHP, And PHP variables inside js with concatenation operator. I hope everyone understood this, I tried to show the interaction of these programming languages with a very simple script as clearly as possible. Leave your questions and suggestions in the comments. Thank you.

    ...
    Coding,  JavaScript,  PHP