darshan

Change Excerpt Length in WordPress

WordPress limits excerpt lengths to 55 words. If you need to change that, then you can add this code to your functions file. functionnew_excerpt_length($length) { return 100; } add_filter(‘excerpt_length’, ‘new_excerpt_length’);Read more …
keithg

Create Post type without plugin – WordPress

Add this code in function.php add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘acme_product’, array( ‘labels’ => array( ‘name’ => __( ‘Products’ ), ‘singular_name’ => __( ‘Product’ ) ), ‘supports’ => array( ‘title’, ‘editor’, ‘author’, ‘thumbnail’, ‘trackbacks’, ‘custom-fields’, ‘comments’, ‘revisions’, ‘page-attributes’ ), ‘public’ => true, ‘has_archive’ => true, ) );...Read more …
Harrisonm

Search with Numeric Value using Meta Query

Goal :  I want to search item/post/product’s which price between two predefined amount using meta query. Default Functionality :- As per default WordPress functionality, All the post or post type’s  custom field value stored in Wp_postmeta table in database. So as per our default functionality , the item/Posts/product’s price is also stored in...Read more …