Author: ShairyPortfolio

  • WordPress In Built Functions -11

    WordPress In Built Functions -11

    Function Name  Description                                 Header and Footer Function get header (); get footer(); These functions import the content of header.php and footer.php wp_head ();   It is a hook that allows WordPress to add HTML, scripts and stylesheets in the <head> tags of your theme. Used in header.php wp_footer(); To load java script files at…

  • Register Widget in WordPress -10

    Register Widget in WordPress -10

    Widgets are blocks of content that you can add to your site’s sidebars, footers, and other areas of your website where you want. These are created to provide a simple, easy and user friendly to control the design and content of their site without doing code.  register_sidebar function is used to register a widget with…

  • Excerpt in WordPress -9

    Excerpt in WordPress -9

    the_excerpt () function is used in WordPress for article summary and WordPress post with a link to the whole content. In another way we can create our own customize function with button and permalink also and the code is given below: //This function is used to get particular character function get_excerpt($count) {     $permalink = get_permalink($post->ID);     $excerpt = get_the_content();     $excerpt = strip_tags($excerpt);     $excerpt = substr($excerpt, 0, $count);…

  • Call WordPress Menu -8

    Call WordPress Menu -8

    Registered menu can be called using the wp_nav_menu function by their theme location name. and WordPress Navwalker class is used for the bootstrap css.Different ways to call the menu are as Way 1: Simply Call the Menu <?php wp_nav_menu(array(‘theme_location’ => ‘headerMenuLocation’))?> Way 2: Step 1: Download class-wp-bootstrap-Navwalker for css Step 2: Then use the following code  <?php wp_nav_menu(array(…