-
AuthorPosts
-
October 31, 2018 at 12:11 pm #1028435
In the default category of my blog are shown the pages (post type: “page”) how is this possible?
Can someone give me a suggestion to solve this problem?
thanks a lot
RodolfoNovember 1, 2018 at 8:30 am #1028749November 1, 2018 at 10:16 am #1028789Hey Rikard ,
https://agenziamatrimonialefirenze.com/amore/The first two are articles, the following are all random pages. The strange thing is that this error only occurs in the default category.
Best regards,
Foffo75November 2, 2018 at 9:08 pm #1029325Hi Foffo75,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaNovember 5, 2018 at 11:52 am #1029849Hi Vittoria, if you give me an email address I’ll send you access.
Best regards,
Foffo75November 5, 2018 at 11:58 am #1029851Hi Vittoria,
here are the credentials.
Best regards,
Foffo75November 7, 2018 at 3:20 pm #1030879hey group!
no one who can help me?
thanks a lotNovember 9, 2018 at 4:50 am #1031500Hi,
I’m sorry for the late response. This filter should help exclude the pages post type from the archive pages.
function ava_exclude_pages( $query ) { if ( is_admin() || ! $query->is_main_query() ) return; if ( $query->is_archive() ) { if ( array_key_exists( 'category', $query->tax_query->queried_terms ) ) { $query->set('post_type','post'); } } } add_action( 'pre_get_posts', 'ava_exclude_pages' );Best regards,
IsmaelNovember 9, 2018 at 11:37 am #1031614Hi ismael, meanwhile, thanks for the support. The filter where should be added precisely in archive.php? or in function.php?
Thanks again
Foffo75November 10, 2018 at 8:35 am #1031935Hi,
Please try it at the very bottom of your child theme functions.php file.
Best regards,
RikardNovember 12, 2018 at 4:11 pm #1032638Hi,
the filter works correctly only if I insert it in the mother thema. In the Child it does not work .Best regards,
Foffo75November 14, 2018 at 4:59 am #1033316 -
AuthorPosts
- You must be logged in to reply to this topic.
