Menu bar

Showing posts with label widget. Show all posts
Showing posts with label widget. Show all posts

Saturday, 10 January 2015

Wordpress Plugins list for post meta

Excellent plugin for Meta Data


  1. Advanced Custom Fields
    This is an excellent plugin to help you add custom metaboxes to save your metadata. The user interface is very polished and all metaboxes are created from right within the WordPress Admin.
  2. Pods - Custom Content Types and Fields
    This is another excellent plugin, but is built with developers in mind. If you need to build something very advanced, and want to manage it from the WordPress dashboard, I recommend you dive into Pods. The developers are very responsive, and the documentation is excellent.
  3. Types - Custom Fields and Custom Post Types Management
    Another advanced solution that will do a lot more than meta-data related fields.
  4. Custom Metaboxes and Fields for WordPress
    This is a library that lets you manage your metabox configuration all in one place via a filter hook. Originally created by Jared Atchison and maintained by Bill Erickson and Andrew Norcross, It's development has been taken over by the crew at WebDevStudios* and is in active development. Definitely check out the wiki for in-depth examples.
  5. Custom Metadata Manager for WordPress
    Another recommended library and is by the fine folks at Automattic, the people behind wordpress.com, so you know you're in good hands.
  6. HM Custom Meta Boxes for WordPress
    Another "CMB" flavor, that was originally forked from Jared Atchison's Custom Metaboxes and Fields for WordPress. It's unique in that it has "a basic layout engine for fields, allowing you to align fields to a simple 12 column grid", among other things.
  7. Fieldmanager
    Fieldmanager is a toolkit for developers to create complex administration screens in WordPress.
    Another advanced toolkit recommended by the folks at Automattic.

Monday, 22 December 2014

How to show or hide specific widget on specific page?


SHOW OR HIDE SPECIFIC WIDGETS ON SPECIFIC PAGES

Did you ever think to show or hide your WordPress widgets on selective pages...of course you can thought of.Because there are some wordpress widgets that should be display on certain pages to make websites look better then before.

You can do this task by putting this snippet in your function files....

Here you have to change the widgetname to name of the widget to show or hide and you can get that name by inspecting your code..

Change the pagename to the name of page on which the widget to be show or hide and this is the slug name of your page...

//Show widget on particular page..
add_filter( 'widget_display_callback', 'show_hide_widget', 10, 3 );
function show_hide_widget( $instance, $widget, $args ) {
  if ( $widget->id_base == 'widgetname' ) { 
     if ( !is_page( 'pagename' ) ) {
         return false;
     }
  }
}

//Hide widget on particular page..
add_filter( 'widget_display_callback', 'show_hide_widget', 10, 3 );
function show_hide_widget( $instance, $widget, $args ) {
  if ( $widget->id_base == 'widgetname' ) { 
     if ( is_page( 'pagename' ) ) {
         return false;
     }
  }
}

Even there is a plugin used to perform this task and the name of the plugin is "Display Widgets".

Tuesday, 15 July 2014

How to add shortcode in a widgets?

How to add shortcode means how to make shortcode runnable when paste  in a widget section.


277341190 3f098a08a4 t The Right Way To Shortcodize WordPress Widgets


Most advice on this converges to this simple line of code:
add_filter('widget_text', 'do_shortcode');
Though a wide spread method, this is not quite correct. The more correct way would be:
if (!is_admin())
  add_filter('widget_text', 'do_shortcode', 11);


if (!is_admin())
  add_filter('widget_text', 'do_shortcode', SHORTCODE_PRIORITY);


to avoid guessing what the number 11 means, but SHORTCODE_PRIORITY is a constant the WordPress team has yet to provide.