Jump to content

Archived

This topic is now archived and is closed to further replies.

dawsonbarber

Support for Custom Post Type Custom Fields in Manual Excerpts

Recommended Posts

dawsonbarber

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

Share this post


Link to post
Share on other sites
ellenmva
@[member=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

Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
dawsonbarber

Awesome. Thanks very much, Ellen!

Share this post


Link to post
Share on other sites
ellenmva

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


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites
dawsonbarber
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?

Share this post


Link to post
Share on other sites
ellenmva

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


Ellen Moore

Pagelines Developer

www.elsue.com www.betterdms.com

Share this post


Link to post
Share on other sites

  • Similar Content

    • werdnags
      By werdnags+
      Can anyone guide me please?
      I would like to learn how to achieve custom fields and going to give ACF plugin a try.  I have watched all the videos and read the documentation and all is good except I can find the template files for the pages and posts.  I believe I should be looking for the file single.php but what about posts?  Is the reason I can't find them because I am using a framework? Pagelines Framework?  How can I add my custom fields to the templates on Pagelines Framework?
      Any guidance would be appreciated please.
    • jharri74
      By jharri74
      Hello, I want to create a form where a visitor can submit content/post from the front end. I did something very similar some years back using wp-types, CRED form with pagelines DMS. When i try to set this up in Platform 5, the CRED form generates but doesn't show. I get a blank page. In the browser's console window, i get the error: Uncaught Error: You cannot apply bindings multiple times to the same element.
      When i deactivate the PL plugin and change the theme, the form appears.
      I'm using Wordpress 4.8.2 and PL 5.1.7
      Thanks.
    • flourishdesignstudio
      By flourishdesignstudio+
      Hi,
      I am using PL5 as well as Advanced Custom Fields (AFC) to help add meta data to individual posts on our blog. However, where I am getting stuck is how to display the meta data on the actual public post page (frontend). For example, if we have posts that have a subject matter of plants then there are custom fields that the client fills out such as "Scientific Name", "Region", etc. I have used ACF before to display this meta data onto the loops section as well as in Revolution Slider or Essential Grid. However, I am not sure if there is a way to have this metadata display on the actual post page. Can you point me in the right direction? I am using a child theme so I wasn't sure if that meant I had to edit the functions.php file or if there was some other workaround that you knew of.
      Thanks so much!
    • Stephen
      By Stephen+
      I'm using the Toolset plugin (Types and Views) to create a CPT and display on the front-end within Pagelines PL5. All is good except that PL5 doesn't pull in the post fields like I created them. 

      For the CPT content template I created it in this order: 
      wpv-post-title My custom image field My custom short description wpv-post-body wpv-post-taxonomy The problem is that it displays on the front-end like this: 
      Feature Image Post Title Post Meta My custom image field My Custom short description Post Body I found only one support ticket in Toolset's forums about this and it has to do with the good old Pagelines Platforms. Nonetheless it has some good info. It points out that, "Content Templates modify the content when called from the_content function. Some themes don't use this function, but define their own. If Content Templates don't work with your theme then you can enter the name of the function your theme uses."

      Can you let me know what what function Pagelines PL5 defines in place of the_content so I can enable PL5 support inside the Toolset settings? If there are any other things I should know about getting PL5 to work with Toolset, all advice is appreciated!
    • PeriniNero
      By PeriniNero+
      We are building a Custom Post Type with Custom Fields and Custom Taxonomies.
      The only thing we dont understand is how to embed the Custom Fields including header tags and stuff in the Postloop (now we use a text-box below the postloop section but also SEO wise this is not best pratice).
      So we thought to copy the dms Postloop section to our child theme and rename this, to add an extra Postloop section to our theme. Is this the way?
      What exactly to adjust in those 3 files class.posts.php, section.php and style.less (at this point we know how to change the thumb LOL) and where to add the Custom Fields shortcodes?
      Thanks.
×