WordPress codex for page
How to get the current page slug?
global $post; $slug = get_post( $post )->post_name;
Get the sub category of the current product category page. This code is applied if you are viewing the product archive page. The codes below and a sample category hierarchy list. Example: Category Parent Category 1 Category 2 Category 3 Category 4 Category 1.1 Category 2.1 Category 3.1 Category 4.1 Here’s a code: $category_object =…
Copy the codes below and follow the instructions. FOR SPECIFIC CATEGORY 1. Install Category Featured Images plugin. 2. Add an image to your category post. 3. Create a file that named category-7.php ( NOTE : The “7” in category-7.php is the category ID of your specific category ). 4. Copy and paste the codes in…
2 column slider <div class="site-inner"> <div class="wrap"> <ul class="two-column-slider"> <li> <img class="alignleft" src="images/author.jpg" alt="Darren Bowden" />Mauris vestibulum tempor tincidunt. Donec interdum pulvinar velit, vel elementum ex semper nec. Duis aliquam nunc sit amet ultrices tempus ultrices tempus.<br /> <br /> <span class="orange-text">Darren Bowden</span> Web and Design </li> <li> <img class="alignleft" src="images/author.jpg" alt="Darren Bowden" />Mauris vestibulum…
Copy and paste the codes below to your custom template. global $current_user; echo get_avatar( $current_user->ID, 150, "https://www.anthonypagaycarbon.com/wp-content/uploads/2016/05/logo.png" ); For more detailed information, please visit here https://codex.wordpress.org/Function_Reference/get_avatar. Happy coding 🙂
jQuery( document ).ready(function($){ if ( document.cookie.indexOf( 'visited=true' ) == -1 ){ var number_of_days = 1; // 1 Day var total_of_days = 1000*60*60*24*number_of_days; var expiration = new Date( ( new Date() ).valueOf() + total_of_days ); document.cookie = "visited=true;expires=" + expiration.toUTCString(); } });