Truncate Widget Title

don’t use echo in filter functions – use return: function widget_new_title($title) { return word_limiter($title,20); } add_filter(‘widget_title’,’widget_new_title’);

Vimeo Feed gived dead link with RSS widget?

The link in the title comes from the RSS feed: it contains a <link> element describing the URL of the entire channel. I think Vimeo (recently?) changed their URL structure so http://vimeo.com/user3235740/videos/uploaded no longer points to the recently uploaded videos, but http://vimeo.com/user3235740/videos/sort:newest does. It looks like Vimeo should update their feeds to include the correct … Read more

WordPress widget value not save?

I also got this problem before. I try to use the (bool) but the problem still occured. (bool) $instance[‘post_date’] will always return true unless $instance[‘post_date’] is an empty array, NULL or empty string you can check this from http://php.net/manual/en/language.types.boolean.php <?php var_dump((bool) “”); // bool(false) var_dump((bool) 1); // bool(true) var_dump((bool) -2); // bool(true) var_dump((bool) “foo”); // … Read more

changing the style of sidebar

if you are using (a child of) twenty ten, then the theme will use body_class() and have a unique css class for each page; use that to style the color of the sidebar widgets; example: .page-id-23 #primary.widget-area { color: #123edf; }

Limit archive widget results

I would use the PHP Code Widget from Otto and then simply put this in the widget to limit the archives to 7 months: <ul><?php wp_get_archives(‘type=monthly&limit=7’); ?></ul> (Give the widget a title like Archives if you want, and remove the default WordPress Archive widget.) Function Reference/wp get archives

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