Excerpt length: get 2 paragraphs

I have modified the earlier solution to your needs. You need to change following line $wpse0001_excerpt = substr( $wpse0001_excerpt, 0, strpos( $wpse0001_excerpt, ‘</p>’ ) + 4 ); to this $wpse0001_excerpt = explode(‘</p>’, $wpse0001_excerpt, 3); // unset the rest of the contents if(isset($wpse0001_excerpt[3])) unset($wpse0001_excerpt[3]); // append </p> to the end of last paragraph if(isset($wpse0001_excerpt[2])) $wpse0001_excerpt[1] .= … Read more

add_role menu pages are not visible

The problem was, that I changed the capabilities AFTER I already created the role. I noticed, that if I change the roles slug, the role became duplicated. So I searched, and found remove_role( ‘tabellenadmin’ ); Add that line somewhere before add_role(). You first have to remove the role, before you can change it.

Load WP Admin scripts in a child theme functions file

The load-scripts.php is concatenation of scripts from performance. It doesn’t impact their functionality. As far as I remember there is no way to reuse it at the site’s front end. However simply looking up and enqueueing specific scripts you need will work just fine. They will just be loaded in normal fashion, without concatenation step.

Getting error while trying to use custom comment function

You should not have the () on the callback field. You shouldn’t need the add_action so remove add_action(‘load_comments’, ‘custom_comments’); And try: wp_list_comments(‘type=comment&callback=custom_comments’); Also, you should extract the $args so they are available in your function: function custom_comments($comment, $args, $depth) { $GLOBALS[‘comment’] = $comment; extract($args, EXTR_SKIP); //etc http://codex.wordpress.org/Function_Reference/wp_list_comments