Skip Navigation

[Resolved] Displaying CPT content on Profile page

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 6 replies, has 2 voices.

Last updated by yashwantK 6 years, 5 months ago.

Assisted by: Beda.

Author
Posts
#876224

Hi !
I am using toolset types and ultimate member plugin on my site.
Ultimate member provides great facility to display user profile and related content.But unfortunately it does not support CPT.
On the profile page it have tabs such as About,Posts,Comments.
Now I want to add my CPT tabs such as Gallery,Reviews,Events.....these tabs will display user generated content.
With one Ultimate member extension I can add tabs with conditions such as who can see it and who can add content with tabs.
But currently I am not able to display user data of these custom post types.I have tried views with POST AUTHOR FILTER but still its useless because Ultimate members shortcode feature.
Actual problem is in ultimate member.......UM provides shortcode for various roles...we need to place it in any page (ex.USER).Now when any new user registers he gets url .....hidden link
When USER page author is admin....then how to display any user content with views ?

#876848

First, I think Ultimate Member Plugin could profit from the BeyondPages Programme that Toolset offers, to authors who want make their Theme or Plugin Custom Post Types ready.
https://toolset.com/documentation/beyond-pages-program/

It sounds like they should allow querying as well Custom Post Types, but maybe they do this already.

Can I ask you to do this test:
- Create a Custom Post Type with this tool:
hidden link
- Insert the code you generate with the tool to your theme's functions.php
- Create a few posts in the newly created post type with a user that you think should show some posts in those tabs
- Try to show posts of that type in those tabs as you are used to.

If this works, we need adjustments on Types side.
If not, the issue should be redirected to the Plugins' author. It would be a generic issue with any Post Type but the native WordPress types.

For the issue related to Views, as far I understand what you describe me, this should work like with Toolset Access ShortCodes.
You seem to wrap content in a ShortCode of Ultimate Members that conditionally shows the content or not.

Now, if Toolset Views ShortCodes, placed within those Conditional ShortCodes of UM Plugin, do not display for the users it's intended for, please can you attach in your next reply a copy of the Plugin, and a detailed step by step instruction how to set things up locally?

Or, you can as well send me a Package of your site, if it's too complex to describe, and indicate me where I can find what on the duplicate.
hidden link

Generally, it seems, one issue is expected, while the second may be a compatibility issue.

#877276

Hi !
I got this resource related to our topic....
hidden link
This can work but I want to do it with views because toolset views offer better options.... can we integrate above code sample with views or content templates to achieve our goal ?

#878820

All you need to do is place either the ShortCode of the View in an HTML editor or if it's is done in PHP, the function to render the View, in the place you want to see it later.

The ShortCode you can generate in the GUI "Fields and Views" by simply clicking on the button which inserts your View.

In PHP, you use this function:
https://toolset.com/documentation/programmer-reference/views-api/#render_view

This will, in any case, display the View wherever you placed it.

Since the Code you show me suggests a creation of a new 3rd Party Custom Tab, then you need to edit the section "/* Tell the tab what to display */" of that 3rd Party Custom Code.

You need to insert above-shown function, so to echo its results.

Their example produces this HTML

<div class="um-item">
  <div class="um-item-link">
    <i class="um-icon-ios-paper"></i>
    <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
  </div>
</div>

You could change that to:

$args = array(
    'title' => 'My View name',
);
echo render_view( $args );
#879320

Hi !
I have provided debug info.

#887679

I have instructed here how to display a Toolset View with either ShortCodes or a PHP Function:
https://toolset.com/forums/topic/displaying-cpt-content-on-profile-page/#post-878820

There I as well elaborate where the PHP function has to be placed to render the View if you create those tabs in a PHP Template.

Please let me know if you need more information related to that.

#914231

Issue resolved by another method.Thanks for help !