Widget internal hooks and functions

Take a look at the default-widgets.php and widgets.php files from wp-includes folder. You’ll find a couple of filters and actions there which will help you. You’re gonna have to try them out, they aren’t documented. Create a list in array, preferrably of all widgetized areas and their id. – Use the filter sidebar_widgets, it will … Read more

jQuery Tabs in Shortcode API

Try This: function defaulttab( $atts, $content = null ) { $GLOBALS[‘tab_count’] = 0; do_shortcode($content) if( is_array( $GLOBALS[‘tabs’] ) ){ $i = 1; foreach( $GLOBALS[‘tabs’] as $tab ){ $tabs[] = ‘<li><a class=”tab” href=”#”>’.$tab[‘title’].'</a></li>’; $panes[] = ‘<div class=”tab’.$i.'” class=”tabcontent”>’ .$tab[‘content’].'</div>’; $i++; } $return = ‘<div class=”tabcontainer”><ul class=”selector”>’.implode( “\n”, $tabs ).'</ul> <div class=”clear”></div>’.implode( “\n”, $panes ).'</div>’; } return … Read more

Why may one avoid Jetpack plugin? [closed]

The most common complaint I’ve heard is that it’s bloated with too many plugins. You can try the Jetpack Lite plugin to avoid that however. http://wordpress.org/extend/plugins/jetpack-lite/ As for their business motivation, I can’t give a definitive answer. I’d venture to say it’s related to being a freemium service as they state in their FAQ: Jetpack … Read more

term_exists returns NULL

It can return null in some cases if you look at the code: http://core.trac.wordpress.org/browser/tags/3.3.2/wp-includes/taxonomy.php#L1492 The method get_var returns null if no result is found. If you check with “==” and not “===” that should work with false or 0.

hybridauth (google OAuth integration) and WP problems

You could use a plugin I believe? In that case, you can try WordPress Social Login which is based on the HybridAuth Library (which you already seem to be using) and Social Connect plugin. As of now, the plugin supports some 20 services including Facebook, Google, Yahoo, Twitter, Windows Live, Foursquare, Linkedin, and Tumblr, among … Read more

get_pages and get_posts returning different data?

You are passing the array for post_status wrong way, Here I updated your code with correction. To show List of pages //To display list of pages $args = array(‘post_status’ => array(‘drafts’, ‘publish’)); $pages = get_pages($args); foreach ( $pages as $page ) { // some html code that displays the page title } To show List … Read more

Multiple sub directories for theme template pages

When I want to change a specific part of template, such as header OR footer then I use conditions like this – if(is_404()) { get_header(`error`); //loads header-error.php } else { get_header(); //loads header.php } In your case, you want to load a completely different template, Now the only action hook I can imagine is – … Read more

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