- This topic has 5 replies, 2 voices, and was last updated 5 years, 5 months ago by
Leo.
-
AuthorPosts
-
November 23, 2020 at 6:41 am #1542271
Marcin
Hi,
I am using Search and Filter Pro to display post in Generatepres Query. It displays post perfectly until I tuch the filters. In filter settings it is written that:* Templates must use the The Loop and not a custom query
I have no idea what does it mean, but I am preaty shure that generatepress has that option. Could You help me?
November 23, 2020 at 9:17 am #1542701Leo
StaffCustomer SupportHi there,
Sorry what do I need to click to see the issue?
GP uses the default
wp_query()for the displaying the posts”
https://developer.wordpress.org/reference/classes/wp_query/Are you able to check with the plugin author first and see what it would need to work?
November 23, 2020 at 11:12 pm #1543554Marcin
Hi, sorry for not responding.
In the left side panel there is a searching widget. It should automaticly work with default query, howewer it looks like it only display results after reload a page.November 24, 2020 at 1:44 am #1543731Marcin
Ok, I get it, well partly. I need to add my custom post type to wp_querry. Should I recreate archive.php in child theme and there add my custom post?
At the moment I’ve added another archive: archive-myposttype.php and it does work, but I cannot edit a look of a querry using Generatepress apperance optionNovember 24, 2020 at 2:24 am #1543776Marcin
It should work like that, but it does not
<?php /* child style */ function childtheme_enqueue_styles() { wp_dequeue_style( 'twentytwenty-style' ); wp_enqueue_style( 'parent_style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css' , false,filemtime( get_stylesheet_directory() . '/style.css' ), 'all' ); } add_action( 'wp_enqueue_scripts', 'childtheme_enqueue_styles', 999 ); //add masonary grid and columns to custom post type add_filter( 'generate_blog_masonry','tu_dedykacja_masonry' ); function tu_dedykacja_masonry( $masonry ) { if ( is_post_type_archive( 'dedykacja' ) ) { return 'true'; } return $masonry; } add_filter( 'generate_blog_columns','tu_dedykacja_columns' ); function tu_dedykacja_columns( $columns ) { if ( is_post_type_archive( 'dedykacja' ) ) { return true; } return $columns; } //end masonary and columnNovember 24, 2020 at 9:37 am #1544695Leo
StaffCustomer SupportHmm that code looks good.
Any chance you can remove the other snippets before it to test?
Can you guide us to the page in question?
-
AuthorPosts
- You must be logged in to reply to this topic.