Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Warning: Cannot modify header information - headers already sent by (output started at /home/themes/public_html/forums/bb-includes/db-mysql.php:12) in /home/themes/public_html/forums/my-templates/kakumei-variant/rss2.php on line 1
ThemeShaper Forums Topic: Read more link in manual excerpt Help In Shaping WordPress Themes en Wed, 27 May 2015 17:51:25 +0000 gaillen on "Read more link in manual excerpt" Fri, 11 Jun 2010 06:51:28 +0000 gaillen 12994@ <p>Thank you again Gene. That worked and so did the reference to the excerpt more filter. I now have both types of excerpts behaving the same on my posts, categories and archives pages. Much easier to explain to my end user if these all have a consistent behaviour. Now they can choose to manually write the excerpt or let it auto generate with the final product behaving the same for readers in both cases.</p> <p>If anyone else is looking for this solution here is the combination in use in my child theme functions.php . Note the addition of a class to the read more permalink to apply CSS styling.</p> <pre><code>// Displays excerpt of posts on posts/home page moved to &quot;articles&quot; with static front page function childtheme_content($content) { if ( is_home () ) { $content= &#39;excerpt&#39;;} return $content; } add_filter(&#39;thematic_content&#39;, &#39;childtheme_content&#39;); // Custom excerpt length (change the numerical value) function new_excerpt_length($length) { return 100; } add_filter(&#39;excerpt_length&#39;, &#39;new_excerpt_length&#39;); // Changes the behaviour of manual excerpts to include read more link (note css class) function all_excerpts_get_more_link($post_excerpt) { return $post_excerpt . &#39;&lt;a href=&quot;&#39;. get_permalink($post-&gt;ID) . &#39;&quot; class=&quot;read-more&quot;&gt;&#39; . &#39; ...continue reading article...&#39; . &#39;&lt;/a&gt;&#39;; } add_filter(&#39;wp_trim_excerpt&#39;, &#39;all_excerpts_get_more_link&#39;); // Filters [...] from the manual excerpts string function new_excerpt_more($more) { return &#39;&#39;; } add_filter(&#39;excerpt_more&#39;, &#39;new_excerpt_more&#39;);</code></pre> <p>-Gaillen </p> em hr on "Read more link in manual excerpt" Fri, 11 Jun 2010 02:49:58 +0000 em hr 12992@ <p>Hi gaillen-</p> <p>I think that the more link behavior of WordPress is more closely tied to building themes with templates than the newer child theme method using filters and actions provided by a theme framework. I still find the excerpt &#38; more-tag variations baffling at times. </p> <p>Try this:</p> <pre><code>function all_excerpts_get_more_link($post_excerpt) { return $post_excerpt . &#39;&lt;a href=&quot;&#39;. get_permalink($post-&gt;ID) . &#39;&quot;&gt;&#39; . &#39;Read More...&#39; . &#39;&lt;/a&gt;&#39;; } add_filter(&#39;wp_trim_excerpt&#39;, &#39;all_excerpts_get_more_link&#39;);</code></pre> <p>You may want to do something with the <code>excerpt_more</code> filter to remove or replace the <code>[...]</code>.</p> <p>Here are a list of codex pages that may shed some light:</p> <p><a href="" rel="nofollow"></a><br /> <a href="" rel="nofollow"></a><br /> <a href="" rel="nofollow"></a></p> <p>-Gene </p> gaillen on "Read more link in manual excerpt" Fri, 11 Jun 2010 01:24:15 +0000 gaillen 12989@ <p>Is it possible to auto generate a read more link for manual excerpts?</p> <p>I can find lots of information to modify the read more link for auto generated excerpts but actually creating one for manually generated seems to not exist? </p>