Adding custom styles to dropdown in editor

You can add this code to your functions.php function add_style_select_buttons( $buttons ) { array_unshift( $buttons, ‘styleselect’ ); return $buttons; } // Register our callback to the appropriate filter add_filter( ‘mce_buttons_2’, ‘add_style_select_buttons’ ); //add custom styles to the WordPress editor function my_custom_styles( $init_array ) { $style_formats = array( // These are the custom styles array( ‘title’ … Read more

How to use

Actually, the LinkControl index is already there in your code.. it’s in the items.map( ( item, index ) ) — yes, that index. So just use it in your onChange callback. And presuming that your edit function starts like ( { attributes, setAttributes } ) => { …, i.e. the setAttributes is defined, you can … Read more

list/consult Taxonomy only for the respective author/creator in dashbboard

The WP_Term_Query class doesn’t have a method named set, and calling $query->set() in my case resulted in a fatal/critical error saying “Call to undefined method WP_Term_Query::set()“. :/ But you can directly modify the query_vars property (i.e. $query->query_vars), like so, to set, unset or override any query variables like meta_query: // Use this: $query->query_vars[‘meta_query’] = $meta_query; … Read more

Password protected photo galleries

These plugins are nice: http://wordpress.org/extend/plugins/wp-members/ http://wordpress.org/extend/plugins/member-access/ http://wordpress.org/extend/plugins/members-only/ http://wordpress.org/extend/plugins/membership/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)