WordPress codex for page
How to get the current page slug?
global $post; $slug = get_post( $post )->post_name;
Add Woocommerce product category image using GeneratePress WordPress theme in few steps. You need to access your functions.php. Either on a parent theme or a child theme. In my case I’m using a child theme so gonna paste the codes below on child themes functions.php Please copy the code below and paste it into your…
Re-register the default genesis sidebar into your function.php. See the image above for html output. genesis_register_sidebar( array( 'id' => 'sidebar', 'name' => __( 'Primary Sidebar', 'genesis' ), 'before' => '<div id="%1$s" class="widget %2$s">', 'after' => '</div></div>', 'before_title' => '<h4 class="widget-title widgettitle">', 'after_title' => '</h4><div class="widget-inner">' ) );
WordPress media library upload restriction, just copy the code below to your functions.php Or install this plugin to do the task WDES User Upload Restriction – https://wordpress.org/plugins/wdes-user-upload-restriction/. add_action('pre_get_posts','wdes_users_own_attachments'); function wdes_users_own_attachments( $wp_query_obj ) { global $current_user, $pagenow; if( !is_a( $current_user, 'WP_User') ){ return; } if( !in_array( $pagenow, array( 'upload.php', 'admin-ajax.php' ) ) ){ return; } if(…
UPLOAD YOUR SITE INTO YOUR WEB HOSTING | WEB DEVELOPMENT | WEBSITE | XAMP | HOW TO CREATE A WEBSITE. EDUCATIONAL VIDEO PARA SA GUSTO TUMUKLAS NG MGA BAGONG KAALAMAN KUNG PANU GUMAWA NG WEBSITES. PAKI-SHARE PO VIDEO NG MARAMI TAYONG MATULUNGAN AT MABIGYAN NG ONLINE SKILLS. MARAMI PA TAYONG PWEDE IBAHAGI SA INYO. LINKS:…
JS Composer shortcode is not working outside the loop, sometimes the JS file is not enqueue to your front end page. Mine is I’m using the Ultimate_VC_Addons and I found the ultimate.min.js and ultimate.min.css is not enqueue to the page. To fix the error, copy this code to your functions.php add_action( 'wp_enqueue_scripts', 'ac_wp_enqueue_scripts' ); function…
Code below is to get current user ID. $user_ID = get_current_user_id(); Code below is to get all user meta. $user_meta = array_map( function( $a ){ return $a[0]; }, get_user_meta( $user_ID ) ); echo $user_meta[last_name]; echo $user_meta[description]; Output : Development Lorem ipsum dolor sit amet, nunc arcu urna, id donec. Sample array. Array ( [first_name] =>…