Jump to content
Stephen

The Content Function

Recommended Posts

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: 

  1. wpv-post-title
  2. My custom image field
  3. My custom short description
  4. wpv-post-body
  5. wpv-post-taxonomy

The problem is that it displays on the front-end like this: 

  1. Feature Image
  2. Post Title
  3. Post Meta
  4. My custom image field
  5. My Custom short description
  6. 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!

Share this post


Link to post
Share on other sites
Simon

PL5 does not use the_content, the framework theme does the main loop and uses the_content to show it.

As you can see in this screenshot.

I looked at the post you quoted from 4+ years ago and couldnt find any setting in wp-types to change any functions?

Share this post


Link to post
Share on other sites
Stephen

Hi @Simon

Sorry I didn't see you're reply until now. I must not have had the notifications on. 

For some reason I can not see a screenshot in your post. However, the setting can be found in wp-types by going to Toolset > Settings > Front-end Content tab, scroll down to almost the bottom and you'll see the "Theme Support for Content Templates" section.

Thanks

Share this post


Link to post
Share on other sites
Simon

Have you tried using 'loops' section?

Share this post


Link to post
Share on other sites
Stephen

I have. The loops section works good for pulling in CPT's, but I'm using the Toolset Post Types and Content Template to layout my own CPT template which Loops doesn't do. As far as I know, PL5 doesn't have a way to create and template CPTs, which is why I am using Toolset to layout my CPT. 

Share this post


Link to post
Share on other sites
Simon

What about a shortcode that shows the content and applies the the_content filter?

something like: 

add_shortcode( 'test_content', function() { return apply_filters( 'the_content', get_the_content() ); } );

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • 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.
    • jharri74
      By jharri74
      I'm working on a custom post type where the admin or user fills out a form (either on the back or front end), and the results are displayed in a post. It is similar to a classified listing. I'm using WP-TYPES plugin for this. I wanted to know if there was a way to put in the short code where the parameters can be entered from a form field. For instance, the google map short code, can the address parameter be the output from a custom field?
    • dawsonbarber
      By dawsonbarber+
      (First: not sure why this was/is added to Viewer because I didn't select Viewer nor were any product prefix options available for selection).
       
      I had some problems with an installation that uses Views quite extensively and, after deactivating all plugins and reactivating one by one, found that the "culprit" was Hooker.
       
      With Hooker active on the site, key Views functionality does not work (e.g., post links are rendered effectively inactive).
       
      As I'd already reached out to the Toolset support team, they did some debugging.
       
      Here's a recap of their findings:
       
      Basically, the problem is that both Views and Hooker use a different version of CodeMirror (script used for syntax highlighting). Views is using version 4.8.0 and Hooker is using version 3.19.   Further details: PageLines DMS Hooker plugin is en-queuing the CodeMirror script on every admin page although it is only using it on a single admin page, while Views is only en-queuing it on the pages it is using it Views registers and en-queues the CodeMirror script with an appropriate handler name, while Hooker is using a "test" name for it. It is also using the same "test" handler for the CodeMirror style sheet Recommendations: Rename the CodeMirror script and style sheet handlers to something less generic than "test" Make sure that Hooker is only registering and en-queuing those assets on the admin page that uses them. Sidenote: For what it;s worth, they also indicated that Hooker may not be fully compliant with the CodeMirror license as, apparently, it does not include the license declaration files.   Perhaps these issues can be addressed in an update?  
    • dawsonbarber
      By dawsonbarber+
      I found that I'm unable to create and save custom field groups with WP Types when Single Bits is installed and active.
       
      I'm not sure if it interferes with any other functionality, but there's definitely an issue with custom field groups.
       
      When I deactivate Single Bits, I'm able to create custom field groups.
       
      Custom fields appear to be fully functioning after creating them and reactivating Single Bits, so that's good.
×