Type: php
WordPress Post Views Counter Function (copy)
function wpb_set_post_views($postID) { $count_key = ‘wpb_post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); }else{ $count++; update_post_meta($postID, $count_key, $count); } } //Get rid of prefetching to keep the count accurate remove_action( ‘wp_head’, ‘adjacent_posts_rel_link_wp_head’, 10,…Continue reading
TEst Library Marko
echo ‘fff’;Continue reading
fb代码
WWOF v3: Force “View Cart” link in the success side-popup to open in the same tab
/** * WWOF v3: Force “View Cart” link in the success side-popup to open in the same tab. */ add_action( ‘wp_footer’, ‘wwof_v3_view_cart_same_tab_script’, 999 ); function wwof_v3_view_cart_same_tab_script() { ?>Continue reading
Untitled Snippet
Untitled Snippet
HTML Snippet
WWOF – Force Default Quantity to 0 and Auto-tick the Add to Cart Checkbox
/** * WWOF v3 (Ant Design Vue): Force default qty to 0 and auto-tick the Add to Cart checkbox * (Supports both manual typing and up/down arrow clicks) */ add_action( ‘wp_footer’, ‘wwof_v3_antdesign_qty_checkbox_script_final’, 999 ); function wwof_v3_antdesign_qty_checkbox_script_final() { ?>Continue reading