Printng text of a post but remove some words
-
All my posts have a gallery short code on the first line. I want to print a post showing the text but use something like a preg replace to remove [gallery] from the result. Can this be done?
query_posts('cat=10&name=Elvis&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); echo '<div class="title">' ; the_title(); echo '<br/>'; the_post_thumbnail(apply_filters('excerpt_thumbnail_size', 'thumbnail')); the_content(); endwhile; endif;
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Printng text of a post but remove some words’ is closed to new replies.