Skip Navigation

[Resolved] Using Toolset relationships with Elementor

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 1 voice.

Last updated by Minesh 1 month, 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2811151

Hi, I'm still working through getting Toolset to work properly on our staging site. What I'd like to be able to do is to use the Elementor templates and bring in Toolset fields and post types through there. I've got some of it working but we want to use related posts - for example if we have a blog post we'd like to show the author, and alongside that, show the author's bio and other posts. The authors are set up in a custom post type 'People', who have long bio, short bio, photo, languages spoken, related posts etc. I have set up some of these in Toolset but I can't see related post areas from Elementor dynamic content - how do I do this? I was told before that I needed to have the upgraded Pro version of Elementor, so we did that but I still can't see those. Do you have a tutorial on this? I'd also like to be able to list our instructors with a searchable area for languages, credentials, etc.

Also, I'd like to know if I have the right setup. Should I have Toolset types and blocks, or Types and Views? I couldn't get views working before - if I have an Elementor template and a views template it will only show one, so is it possible to do this with an elementor template and which plugins from Toolset? Which setup best allows me to see the toolset stuff through the Elementor builder?

---

Regarding documentation, I've been looking at various things but don't see an answer to this particular question, given that I am trying to use Elementor builder, not blocks.

This page (https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/) says:
"Elementor provides a free and Pro version. Both work with Toolset.
To use Elementor with the WordPress Block Editor, you must install the free Elementor Blocks for Gutenberg plugin.
To use Elementor with Toolset, you must install:
Toolset Types
Toolset Blocks"

I asked Chat GPT, which searched your site and told me: "For sites utilizing Elementor, Toolset Views is the recommended choice. It allows you to create custom queries and display dynamic content using shortcodes, which can be easily inserted into Elementor templates. This approach offers greater flexibility and compatibility, especially when dealing with complex layouts or dynamic content ."

So I don't know which is the recommended setup.

---

What is the link to your site?
hidden link
hidden link. (blog page example)

If it's possible to reply to me directly, that would be great. My email is jonimillar@me.com (I'm the web designer).

Thank you!

#2811208

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Toolset has limited integration with Elementor and here is the Doc that you should follow:
- https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/

To display related post you will require to build a view and that display the view with Elementor's Toolset view widget or using view shortcode.

If you can share problem URL and tell me what exactly you want to display where and send me admin access details, once I review your requirement I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2812054

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - with the elementor template you shared I can see the section with heading "Related Podcasts".

What exactly you want to display under "Related Podcasts" section?

For example, here is the single person post:
- hidden link

And here is the single post type post:
- hidden link

On what single post you want to display what under what section?

#2812277
dynamic.jpg

Yeah, so for example on that one, I'd probably make a relationship from Maddie's entry in the 'People' post type to link it to this post, and then on the post I'd add Maddie, her name, and her short bio, and perhaps a link to her or something. I see that Elementor does show me a lot of custom fields, but which things do I have to do in a 'view'? Just relationships?

On the podcast posts, I'd do the same sort of thing, and bring in the guests' bios as well.

I see that the Toolset Views is not giving me the error message anymore, I can create a view so I will try that and see how it goes., then insert it as a view into my Elementor template - is that correct?

Also, do I keep Toolset Views, Toolset blocks and Toolset Types activated?

thanks for your help.

#2812390

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Toolset Views and Toolset Blocks are 1:1 copy of each other.

You should have any one of them active at a time. So, lets say Toolset Blocks is active and you can enable the legacy view by following the steps given with the following link:
- https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

Once you enable the legacy view, you can create your view as required.
- https://toolset.com/documentation/legacy-features/views-plugin/

And then add a Text module and within the text module you should try to add your view.

Here is the Doc that shows how you can usae Elementor with Toolset.
- https://toolset.com/course-lesson/using-toolset-with-elementor-page-builder/

#2812993

Hi, I've been working on this process with some help from ChatGPT. It said if I use Toolset views I would have less styling functionality in the views and that instead I could use some php code in my child theme functions.php file to accomplish the same thing , then use an ID to pull it into a loop grid in Elementor. I've gotten this to work with some code like this (see below). I just wanted to check that this is a good way to do this and there wasn't some important reason why I should be using toolset views instead? I'd prefer to style it in Elementor rather than css if possible in case other people working on the site need to change it.

here's an example of the code, then I used "person_post_writer" as the id in elementor loop grid.

// Custom Elementor queries for Toolset relationships from Person → Post or Podcast

// POSTS written by this Person
add_action( 'elementor/query/person_post_writer', function( $query ) {
if ( ! is_singular('person') ) return;

$person_id = get_queried_object_id();
error_log('Running person_post_writer query for person ID: ' . $person_id);

$related_ids = toolset_get_related_posts(
$person_id,
'post-writer',
'parent',
999,
0,
array(),
'post_id'
);

if ( $related_ids ) {
error_log('Related post IDs found: ' . implode(', ', $related_ids));
$query->set( 'post__in', $related_ids );
$query->set( 'orderby', 'post__in' );
} else {
error_log('No related posts found. Setting post__in to 0.');
$query->set( 'post__in', array(0) );
}
});

Thanks for your help!

#2813071

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - you can write your business logic and filter the posts as per your requirement using Elementor hook no harm in that.