Prevent Advanced Excerpt from Being Called
From looking at the plugins code in repo SVN trunk, you have only the option to add the_advanced_excerpt() manually in code. So simply don’t add it, or did I miss something?
From looking at the plugins code in repo SVN trunk, you have only the option to add the_advanced_excerpt() manually in code. So simply don’t add it, or did I miss something?
Here is a custom function I’ve written to modify your excerpt however you want. You should NOT be changing any core files to make modifications, as these will be overwritten by any updates made to the WordPress framework: remove_filter(‘get_the_excerpt’, ‘wp_trim_excerpt’); add_filter(‘get_the_excerpt’, ‘preserve_excerpt_format’); function preserve_excerpt_format($text) { global $post; $raw_excerpt = $text; if (” == $text ) … Read more
Excerpt is stored in database and available in post object only if it was added manually in post editor. Do not access such properties directly, use template tags instead – get_the_excerpt() in this case.
Use “wp_reset_postdata();” right after “endwhile;” seems like your second query fetching link from your previous query.
Don’t use get_the_excerpt. Just do something like: if (is_singular() && isset($post->post_excerpt)) { echo ‘<meta name=”description” content=”‘.esc_attr($post->post_excerpt).'” />’; } $post is populated long before the Loop. For “single” pages it will be populated with the post to be displayed. You can grab it very early in the page load. For other types of pages– archives, capital … Read more
Use strip_shortcodes as well. That should remove the shortcodes from the content. A couple of notes: Your code seems to be doing some things that I don’t understand. For example, you run the the_content filter on your content which adds markup, only to run strip_tags later, which removes (at least some of) that markup. strip_tags … Read more
Are you using the_excerpt() or $post->post_excerpt? Use $post->post_excerpt and count your words then if the limit exceeds show the read more otherwise don’t show.
The line below the one you edited computes the edited words based on the height and width of the slider box. The value you added is changed on the next line. Avoid editing the plugin file. Next time you update the plugin your changes will be lost. You should be able to change the Excerpt … Read more
The Advanced Excerpt plugin offers the_advanced_excerpt() for customisation, take a look here. The layouts you want to achieve are basically depending on your css, you have to declare the rules for them depending on the body of each template (home and blog). For adding body classes take a look at the codex, if your theme … Read more
When there is <!–more–> tag inserted in post, this post will be truncated on lists pages. You can use global $more variable to make WordPress think it’s single page though. Here is your modified source: <?php query_posts(‘cat=1&paged=’.get_query_var(‘paged’)); ?> <?php global $more; $prev_more = $more; $more = 1; if (have_posts()) : while (have_posts()) : the_post(); ?> … Read more