• Resolved nipponese

    (@nipponese)


    Is possible to have multiple excerpts or each post, or is there a plugin which can accomplish this? I have a layout that uses three different queries to show a “featured” article on the home page, the side bar, and on a separate ‘featured’ page (this doesn’t include the actual post in single.php).

    But of course, each need to look different. So far I have been pulling the different ‘look’ from the except. Is there a better way to do this, or is there a way I can create more than one except?

    Thanks in advance for any help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • What do you mean by “different looks”? If you mean completely different manual excerpts, then you can use custom fields to accomplish this. If you mean just different excerpt lengths, then that may be a bit harder. You’ll have to directly access the content, truncate it, then apply wp_texturize and wpautop to the final result (possibly other steps I’m forgetting, too).

    Thread Starter nipponese

    (@nipponese)

    Thanks for your reply!

    Different manual excerpts would be great, but how can I use custom fields to accomplish this?

    I am trying to use the info on this page:
    https://codex.www.ads-software.com/Function_Reference/get_post_custom_values

    But I can’t get the template tag to return anything.

    Thread Starter nipponese

    (@nipponese)

    Maybe I have it, how does this look?

    <?php
    		$post_id = $post->ID;
    		$key = 'sidebar_except';
    		echo get_post_meta($post_id, $key, $single);
    	?>

    looks ok to me.

    Thread Starter nipponese

    (@nipponese)

    Found that the best answer was to use Custom Field Template Tags

    nipponese. you read my mind! will look into Custom Field Template Tags right away
    thanks MAN, you could just make my day

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Is it possible to have multiple excerpts for each post?’ is closed to new replies.