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+    19
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    112
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+    19
dawsonbarber

Awesome. Thanks very much, Ellen!

Share this post


Link to post
Share on other sites
ellenmva    112
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+    19
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    112
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

    • 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.
    • MissT
      By MissT+
      Hi there, the Filter By option within the Masonic section isn't working when a custom post type and custom category is selected.  If you swap to normal posts and categories then it works but sadly not with custom post types and custom categories.
      All posts are shown but when you click on the categories all posts disappear even though posts do have these categories. When you click All all the posts come back. I've tried this on two different websites with the same result.
      Many thanks in advance.
    • Josiah Jones
      By Josiah Jones
      Hi,
      I'm currently using the Filtering plugin on a website that is not yet live (http://www.RetroLeaders.com/ - currently hidden by a "Coming Soon" plugin) however after updating to the most recent version of Wordpress and DMS the Filtering plugin has stopped working and is causing DMS to display the never ending load icon.
      Inspecting the code for errors I see the following problems:
      . jquery.isotope.min.js?ver=1.7.4:11 Uncaught TypeError: Cannot read property 'opera' of undefined (anonymous function) @ jquery.isotope.min.js?ver=1.7.4:11 (anonymous function) @ jquery.isotope.min.js?ver=1.7.4:11 (index):66 Uncaught TypeError: mycontainer.isotope is not a function (anonymous function) @ (index):66 jQuery.Callbacks.fire @ jquery.js?ver=1.11.2:3143 jQuery.Callbacks.self.fireWith @ jquery.js?ver=1.11.2:3255 jQuery.extend.ready @ jquery.js?ver=1.11.2:3467 completed @ jquery.js?ver=1.11.2:3498
        Can you please check if everything is working properly and provide an update if necessary? The filtering function is a crucial part of my web design and we cannot go live without it!
      Please let me know what you find.
      Best,
      - Josiah 
×