Jump to content


Photo
Filtering

Support for Custom Post Type Custom Fields in Manual Excerpts

custom fields wp-toolset wp-types wp-views custom post types manual excerpts

  • Please log in to reply
5 replies to this topic

#1 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 148 posts

Posted 10 December 2013 - 05:03 PM

I've got filtering installed on a site that makes heavy use of custom post types and custom fields (via WP-Toolset).

 

Filtering does support custom post types but it's not processing custom fields used in the manual excerpts.

 

I know WordPress, by default, doesn't do shortcodes in manual excerpts, so I've added the following code to my functions.php file:

 
add_filter( 'the_excerpt', 'do_shortcode');
add_filter( 'get_the_excerpt', 'do_shortcode', 5 );

That solves the problem for WordPress excerpts but not for Filtering excerpts.

 

Is there a way to make this happen for Filtering?

 

Many thanks



#2 ellenmva

ellenmva

    Advocate

  • Members

  • 290 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 10 December 2013 - 10:29 PM

@dawsonbarber I have the excerpt function setup to strip the shortcodes, show like a true excerpt. Let me see if I can add a hook for you to add the filter back on, possibly remove my filter. Give me a day or two to put it together and push an update. Best, Ellen

#3 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 148 posts

Posted 10 December 2013 - 11:20 PM

Awesome. Thanks very much, Ellen!



#4 ellenmva

ellenmva

    Advocate

  • Members

  • 290 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 11 December 2013 - 05:12 PM

@dawsonbarber Okay, I added the ability to select whether you want to show shortcodes in Filtering Excerpts. You should have an update in your wp-admin under Updates (sometimes takes a few hours to show). Then, just go to Filtering Options and under Post Options you will see the checkbox at the bottom to show shortcodes in excerpts.

 

Let me know if that works for you.

 

Best,

 

Ellen



#5 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 148 posts

Posted 12 December 2013 - 04:21 PM

Hi Ellen
 
Thanks for the quick action. Unfortunately, the shortcodes for custom fields still aren't getting processed.
 
I'm using the latest version of WordPress, DMS, and Filtering.
 
The only other plugins active on the site are WP-Types, WP-Views, DMS Pro Tools, and Filtering.
 
I'm using the Base child theme on a multi site installation.
 
Just wondering if multi site could be the problem?


#6 ellenmva

ellenmva

    Advocate

  • Members

  • 290 posts
  • LocationMassachusetts
  • Country: Country Flag

Posted 12 December 2013 - 05:25 PM

@dawsonbarber No, multisite shouldn't be a problem. Just checking that you checked the box that says Show Shortcode in Excerpts? If so, can you export your custom fields and any cpts they are attached to. You can export them through WP-Types. That would help. 

 

Thanks. Ellen

 

DMS_1.2___Just_another_WordPress_site.pn





Also tagged with one or more of these keywords: Filtering, custom fields, wp-toolset, wp-types, wp-views, custom post types, manual excerpts