How to add a looper/slider of certain events to the portfolio single layout

Hi
is there a way to add an event category looper/slider to the portfolio single layout?
I have some portfolio entries, these are the offers.
I use a portfolio single layout for this.
I have some MEC events, with certain event categories, related to the offers.
Now I want to add in my portfolio layout a looper/slider with certain events, fitting to the offer.
Is this possible?

This means:
Depending on the displayed portfolio entry with my single layout page, I want to show a variable list of certain events.

Example:

Portfolio entry 1 (Offer 1)
Event 1 (of category 1)
Event 2 (of category 1)
Event 3 (of category 1)

Portfolio entry 2 (Offer 2)
Event 4 (of category 2)
Event 5 (of category 2)
Event 6 (of category 2)

Thank you and kind regards!
Hannes

Hi Hannes,

Thanks for reaching out.
You can add that through the Slider Container and Looper Provider. You need to add the specific category to the Looper Provider > Query String. I would suggest you go through the following thread which may help you with this.

If you are not proficient in this, I would suggest you hire a developer who can assist you to do the customization or you can avail of our newly launched service called One, where we answer the questions beyond normal theme support.

Thanks

Thank you.
This is a great tool.
I have built this string:

post_type=mec-events&tax_query%5B0%5D%5Btaxonomy%5D=mec_category&tax_query%5B0%5D%5Bterms%5D={{dc:post:title}}

It does not work.
Is this possible this way?

Best regards and thank you for your great support,
Hannes

Hello Hannes,

To better assist you with your issue, kindly provide us your WP credentials so we can check your element structure and looper settings. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Thank you very much!
Here are the credentials in a secure note.

Hey @Salilou,

I have logged in and check both the Events and the Portfolio items. I do not see any connection between the two. How can I see that Offer 1 is connected to category 1 and the same with the Offer 2 with the category 2? Please provide us an example or at least the URLs of the events that is connected or related to the portfolio item.

Thank you in advance.

name of portfolio entry = name of event category

Example:
name of portfolio entry “Yoga für Kinder” = name of event category “Yoga für Kinder”

That means:
Portfolio single layout page of portfolio entry named “Yoga für Kinder” shall show a looper / slider with all events of event category “Yoga für Kinder”

That means generally:
Portfolio single layout page of portfolio entry named “XY” shall show a looper / slider with all events of identically named event category

Hope that is clear :slight_smile:
Thank you very much!
Hannes

Hello Hannes,

You will be using this custom query:

$args = array(
    'post_type' => 'mec-events',
    'tax_query' => array(
        array(
            'taxonomy' => 'mec_category',
            'field'    => 'name',
            'terms'    => 'Yoga für Kinder',
        ),
    ),
);


 var_dump( http_build_query( $args ) );

This will give you the following query string:
post_type=mec-events&tax_query%5B0%5D%5Btaxonomy%5D=mec_category&tax_query%5B0%5D%5Bfield%5D=name&tax_query%5B0%5D%5Bterms%5D=Yoga+f%C3%BCr+Kinder

And by replacing the taxonomy name to the title of the portfolio item, you will have this final query string:
post_type=mec-events&tax_query%5B0%5D%5Btaxonomy%5D=mec_category&tax_query%5B0%5D%5Bfield%5D=name&tax_query%5B0%5D%5Bterms%5D={{dc:post:title}}

Kindly let us know how it goes.

That works great.
Thank you very much.
Your tolls and support are the best!
Have a nice day!

Hi Hannes,

Glad that we are able to help you.

Thanks