Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Archive Page + GB + WP Grid Builder

$
0
0

Replies: 0

Hi there,
I created a Custom Post Type for some recipes, with taxonomies (for things like ingredients, time of cooking, etc…).

I would like to visually design an archive page with faceted navigation with Gutenberg.
For the faceted navigation, I use WP Grid Builder which is adding some URL parameters when you select a facet.

Once my faceted navigation setup, I’ve tried two things :
1. Create a page with Gutenberg, then create an archive-recipe.php file, and add the content to the archive page like so:

get_post($id); 
$content = apply_filters('the_content', $post->post_content); 
echo $content;

A bit hacky, but it works except that I can’t use any GenerateBlocks such as Containers/Grids/Buttons because there’s no CSS loaded yet.

2. Create and design an Element with a hook on my recipe archive page.
It renders great, with GB Containers, Grids, and Buttons, but if I select a facet, the URL is not changed anymore, and I can’t have prefiltered results with URL parameters.

I’m kind of stuck between these two solutions.
Is there a way to load GB CSS for archive pages ?
Is it possible to “forward” an URL change from a GB Element to the hooked page ?

Thanks for your help !


Viewing all articles
Browse latest Browse all 59525

Trending Articles