Reputation
4,448
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 7 17
Newest
 Enlightened
Impact
~214k people reached

Feb
4
awarded  Enlightened
Feb
4
awarded  Nice Answer
Oct
15
awarded  Yearling
Mar
22
awarded  Nice Answer
Oct
15
awarded  Yearling
Jan
31
answered send email to all registered users when post expires
Jan
21
awarded  Constituent
Jan
13
awarded  Caucus
Oct
15
awarded  Yearling
Aug
28
answered How can I implement Search feature for Membership site?
Aug
22
comment How to create category index table out of wordpress site or on other website?
@G.M. I would also be interested in learning how such a solution would work. example.com/blog/ & example.com probably have different session & for that reason i doubt such a solution will cover all use cases
Jun
24
comment How to limit the characters shown on the page - get_content
Haven't tested but if all you want is to add the length parameter to wp_trim_excerpt, then this would be more dry function my_trim_excerpt($text = '', $length = 0) { if($length && is_numeric($length) { $function = create_function('', 'return '.intval($length).';'); add_filter('excerpt_length', $function, PHP_INT_MAX);/* running last */ $text = wp_trim_excerpt($text); remove_filter('excerpt_length', $function); return $text; } return wp_trim_excerpt($text); }
Jun
24
comment How to limit the characters shown on the page - get_content
Yes. The new excerpt will be either same as old excerpt or exactly 10 words (whichever is lower)
Mar
28
answered How to find what index page a post is on?
Mar
18
comment replace current_page_item class in menu
In that case, you don't need remove_filter. Also copy the add_filter line from inside the display_element function to directly in your functions.php, otherwise it will not work in case you decide not to use the walker in future.
Mar
18
comment replace current_page_item class in menu
remove_filter is to remove the functionality of replacing classes. I added it so that this doesn't affect any of the other menus you might have on your site. As for it not working, make sure you're adding remove_filter line at the bottom of the function
Mar
17
answered replace current_page_item class in menu
Mar
17
answered What should I put on my index.php?
Mar
13
comment get_posts() and filters
Yup, just add another condition if(defined('DOING_AJAX') && DOING_AJAX). This one is true only in ajax requests
Mar
13
answered Retrieving custom field value with get_post?