How to return the_excerpt (without echo)?

Sure thing my friend, you see, the function “the_excerpt” (located at “WORDPRESSINSTALLDIR/wp-includes/post-template.php”) is the one that makes the echo: function the_excerpt() { echo apply_filters(‘the_excerpt’, get_the_excerpt()); } so, what you want is to use the same function “apply_filters” without the echo: $myexcerpt = apply_filters(‘the_excerpt’, get_the_excerpt()); …and there you have your excerpt.

WordPress custom taxonomy description for each post?

sounds like a silly question but are you echo’ing it out? <?php echo term_description($term_id, $taxonomy); ?> otherwise you’ll need to get the current post’s terms (where my_term is your custom taxonomy): $terms = wp_get_post_terms( $post->ID, ‘my_term’ ) then get the description for the first term in ther array: echo term_description($terms[0]->term_id, ‘my_term’); I’ve not tested this … Read more

How do i hide the if the appears

There are two ways to do this, though one is arguably better than the other. Use JavaScript (Works, but not optimal) The first way to do this is by using JavaScript. I’m not a fan of using this approach because it requires a web browser to perform the toggling. This negatively impacts SEO because, to … Read more

How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?

There are 3 methods. Somewhat weird but since this text is internationalized you can filter the output. This is just an example to remove the text, the link is still present in the source. add_filter(‘gettext’, ‘remove_powered_by’, 20, 3); function remove_powered_by( $translated_text, $untranslated_text, $domain ) { $custom_field_text=”Proudly powered by %s”; if ( !is_admin() && $untranslated_text === … Read more

wp_mail function timing out

Well, this isn’t a full solution per se, but I would start by isolating whether the problem is the SQL queries or the wp_mail() call. If you comment out the wp_mail() line, you can get an idea of how long the function takes to run the queries and build the messages without trying to send … Read more

Permanently remove first image from posts

Just as @s_ha_dum suggests, you can loop through all of your posts and update the content of each one. The following gives you the idea but is untested: $posts = get_posts( array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 500, ‘offset’ => 0, ) ); foreach( $posts as $post ): // Update each post with your reg-ex … Read more

Moving a PHP web-app to WordPress

In my opinion as long as your needs are exclusively about looks it’s never a good reason to migrate to entirely different code base. The separation of backend code and frontend site is inherently one of the strengths in web development. When you you are a lone developer on own project there are roughly three … Read more