Why archive page can’t show full content?

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

Replace text in excerpt

You code works where the function the_excerpt is used. It does not work when get_the_excerpt is used, which does not apply the the_excerpt filter. It applies get_the_excerpt instead. Using get_the_excerpt will cause the filter to apply to both the cases since the_excerpt() uses get_the_excerpt(). Automatically generated excerpt content is a different thing since it is … Read more

Make only the image an anchor link using the advanced excerpt plugin?

To get a link around only part of the excerpt content you will need a filter on get_the_excerpt similar to the following: function dummy_excerpt_filter($excerpt) { // manipulate the excerpt return $excerpt; } add_filter(‘get_the_excerpt’,’dummy_excerpt_filter’); The problem with that is that the // manipulate the excerpt part means using regex on your excerpt content, which can be … Read more

Adding […] string for a custom excerpt function

I have a custom except function I use all the time, it will cut off in the middle of a sentence, but it works great. Just drop this baby into your functions.php and then <?php the_excerpt_truncate(100); ?> just change the 100 to your desired character limit. // THE EXCERPT MAX CHAR function the_excerpt_truncate($charlength) { $excerpt … Read more

Limit number of characters in different excerpts

Put the following code into functions.php: // TRUNCK STRING TO SHORT THE STRINGS function trunck_string($str = “”, $len = 150, $more=”true”) { if ($str == “”) return $str; if (is_array($str)) return $str; $str = strip_tags($str); $str = trim($str); // if it’s les than the size given, then return it if (strlen($str) <= $len) return $str; … Read more

content and excerpt not displaying

I figured it out myself and it worked. Here is the code if anyone need any help. $the_query = new WP_Query(‘page_id=1’) ; if ( $the_query->have_posts() ) { while ( $the_query->have_posts() ) { $the_query->the_post(); the_title(); the_content(); the_excerpt(); } } else { // no posts found } wp_reset_postdata(); Edit: This is working because the_content() and the_excerpt() have … Read more

Add Filter – Pass Variable (PHP < 5.3)

You could try something like the second option, but I think it would be overkill. Instead, just write your own custom analog to wp_trim_excerpt() (the function that applies the excerpt_length and excerpt_more filters to the excerpt), like so: function custom_excerpt( $new_length = 20, $new_more=”…”, $strip = false ) { // Start with the content $text … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)