Author: ShairyPortfolio

  • Register Menu in WordPress -7

    Register Menu in WordPress -7

    In WordPress, menu can be registered using register_nav_menu functions and use hook after_setup_theme to support this register_nav_menu (‘any Name’, ‘Human Friendly Name’)       Registers a navigation menu location for a theme. add_theme_support  Registers theme support for a given feature. Like title, custom Logo etc. after_setup_theme     This hook is called during each page load, after the theme…

  • Function File in WordPress -6

    Function File in WordPress -6

    In WordPress, functions.php file act as a plugin for WordPress site that’s automatically activated current theme. This file uses PHP code to add or change default features on a WordPress site. The Following hooks are given with their purpose. add_action()   Actions are the hooks that the WordPress launches at specific points during execution, or when…

  • Header, Footer in WordPress -4

    Header, Footer in WordPress -4

    get_header() and get_footer() includes the header and footer template for a customize theme. Header.php <!DOCTYPE html> <html>     <head>       <meta charset=”UTF-8″>       <meta name=”viewport” content=”width=device-width, initial-scale=1.0″>         <?php wp_head();?>     </head>     <body> [HTML and PHP Code of Header] Wp_head () prints scripts or data in the head tag of HTML Footer.php [HTML and PHP Code of  Footer ] <?php wp_footer();?> </body> Wp_footer () prints scripts or…