 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
August 25, 2023 at 3:38 pm #1417153Hi Support, This is one of the posts of custom post type and when you scroll down to related posts section you can find this posts there and I want to show other posts of this category excluding this but not able to get this done. 
 Need you support to solve this.
 I have enfold 5.2.1 installed but child theme is activated.August 28, 2023 at 8:00 am #1417300Hi Support, Still not received any feedback regarding this from you end. August 29, 2023 at 8:59 am #1417378Hi Support, Still no response. August 31, 2023 at 12:29 pm #1417687Hi Support, Still not received any feedback regarding this from the support team. September 1, 2023 at 4:11 pm #1417840Hi Support, Is thee anyone to look into and solve my issue?? September 2, 2023 at 3:35 am #1417857Try this snippet in your child-theme functions.php: function ava_exclude_current_post($query) { if (is_singular('post') || is_singular('portfolio') ) { $exclude = avia_get_the_ID(); $query->set( 'post__not_in', array($exclude) ); } } add_action('pre_get_posts', 'ava_exclude_current_post');// in the if-clause you can use aswell : if(is_single()){September 2, 2023 at 3:21 pm #1417876Hi, 
 Thank you Guenni007 this looks like it solved NicomIT issue since the “MORE ESCORTED TOURS” section doesn’t include the same post.Best regards, 
 MikeSeptember 2, 2023 at 6:01 pm #1417887i guess not – maybe the custom-post type had to be first included to ALB support: Replace the “event” with the name of your CPT: function avf_alb_supported_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'event'; return $supported_post_types; } add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1); function avf_metabox_layout_post_types_mod( array $supported_post_types ) { $supported_post_types[] = 'event'; return $supported_post_types; } add_filter('avf_metabox_layout_post_types', 'avf_metabox_layout_post_types_mod', 10, 1);September 2, 2023 at 6:40 pm #1417894Hi, 
 Why, did you see the same item in the “MORE ESCORTED TOURS” section? I didn’tBest regards, 
 MikeSeptember 3, 2023 at 1:16 am #1417928no – but if you go further to f.e. “Rail across Canada” that Post is still on the slider. 
 So try to include your CPT ( guess it is: escorted-vacations) to the alb handlingSeptember 3, 2023 at 3:55 pm #1417957September 4, 2023 at 7:25 am #1418000or Mike …. maybe it is first needed to include the CPT to search – as you have done it here: https://kriesi.at/support/topic/seiten-aus-der-enfold-suche-ausschliesen/#post-1396760 September 4, 2023 at 8:34 am #1418008Hi, Thanks Mike & Guenni007, for the help and support, it helped me a lot to solve the issue. Please check my other issue that I have created long time but no body responded yet. September 4, 2023 at 9:50 am #1418016Hi Mike & Guenni007, journey_start_date & journey_end_date are the two custom post meta filelds that we have created for CPT escorted-vacations and we want to sort in ascending order with orderby journey_start_date, can you please help me regading this. September 4, 2023 at 10:29 am #1418022Thanks Mike & Guenni007, for the help and support, it helped me a lot to solve the issue. would you please share your working solution … September 6, 2023 at 6:44 am #1418241Hi, We replied here: https://kriesi.at/support/topic/how-to-sort-custom-post-type-posts-with-custom-post-meta-field/#post-1418130 Best regards, 
 Ismael
- 
		AuthorPosts
- The topic ‘How to exclude current posts from related posts grid’ is closed to new replies.
