I'm building a website pro-bono for a friend searcher and making a template for 280 pages which will have the same structure as we want to be able to modify it in 1 place.
I do this with elementor template builder. In this template, I query several blocs of grid contents from different post types and it will display them depending on a common category.
For CPT, it's easy. I shared the native post category with ACF into the Page Type + into all my CPT, then I query dynamically the id into the post grids with Crocoblocks plugin.
The logic is id of the page = id of the posts/custom posts
But, I have a pdf flipbook plugin Dearflip which has already a shortcode to display a nice grid and I don't want to loose its functions like opening the flipbook in a modal. It's a CPT with posts and categories.
I don't code myself, so I'd be happy if you can help me.
1/ I need dflip_category from this plugin to share the same post category terms like the others CPT so my page category checked can show the right contents dynamically.
- either I find a way to make this taxonomy showing into ACF so I can modify it to take terms from the post category - I found this https://www.acf-extended.com/features/modules/dynamic-taxonomies#existing-taxonomies but I mustn't do it right, it's not working
- either I add some hook into function.php but I'm not a coder so I have no idea how to do this
2/ I need to find a way to put the shortcode in the template with a dynamic id coming from the page category as it will be the same id. So I'm looking for a way to inject the page id dynamically into the shortcode.
The shortcode grid is like this [dflip books="slug"] and I'd like something like this [dflip books="{insert_page_category_slug}"] [/dflip]
- I found this https://www.isitwp.com/get-custom-field-value-with-shortcode/
- and this https://www.engagewp.com/how-to-insert-custom-fields-into-shortcodes/
Any help with the correct code would be awesome! I've been searching everywhere how to do it. It's out of my league.
Dearflip plugin CPT name : dflip taxonomy: dflip_category my Page (ACF) taxonomy : cat_id
Thanks in advance if anyone can help.