get_posts() not working in functions.php

This is a bandaid, not a fix. But it seems there is a bug within WP_Query, so I had to modify the query right before it was actually run in order for the post_type parameter to not be ignored. 1) I changed get_posts() to a WP_Query 2) I added this to my functions.php file: function … Read more

Why does my widget break other widgets?

I can already see a problem. It is your use of switch_to_blog(). You are potentially doing multiple switch_to_blog() calls; calling restore_current_blog() once at the end of the loop is meaningless. Please review the codex with examples – http://codex.wordpress.org/Function_Reference/switch_to_blog A quick fix is putting restore_current_blog() within the foreach loop. What happens if you do not use … Read more

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