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 …

For multiple selection with checkbox

when you required to select multiple values from dropdown and wants to display them then  use Fselect jquery plugin. you can also customise image here  and display image in dropdown. click here for demo: http://www.jqueryscript.net/demo/jQuery-Plugin-For-Filterable-Multiple-Select-with-Checkboxes-fSelect/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 …