Skip Navigation

[Gelöst] Format Excerpt in a View

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 9 Jahre, 9 Monate. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by jasonH-4 vor 9 Jahre, 9 Monate.

Assisted by: Luo Yang.

Author
Artikel
#232058

Forgive me if this is an easy answer, but I have looked and haven't found it. I am using a view to show an except of a custom post type (along with the post's title and author and featured image). I would like to be able to do some html formatting in the except (bold text, put in a link, etc.). Is this possible?

I tried using this plugin (Rich Text Excerpts http://wordpress.org/support/plugin/rich-text-excerpts) which seemed to work fine in the post itself in terms of adding formatting, but it doesn't show up in the View.

Is there a better way to do this? Is there a way to do this at all?

Thanks for advising a newbie!

#232113

Hi jasonH-4,

I suggest you try create another shortcode for it like this:
1) add codes in your theme/functions.php

add_shortcode('advanced-excerpt', 'my_advanced_excerpt');
function my_advanced_excerpt() {
   return get_the_excerpt();
}

2) use shortcode [advanced-excerpt] in your content

More help:
http://codex.wordpress.org/Function_Reference/get_the_excerpt

#232262

Perfection! Worked like a charm. Thanks so much!

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.