 
	
		
		
		
		
			
- 
		AuthorPosts
- 
		
			
				
February 6, 2015 at 1:49 pm #392028Hi, At the moemnt I’m using this code in my child functions.php `// post 
 if (!class_exists(‘avia_customcptbox_post’)) {
 class avia_customcptbox_post extends avia_newsbox {
 function avia_customcptbox_post() {
 $this->avia_term = ‘nieuws_cat’;
 $this->avia_post_type = ‘nieuws’;
 $this->avia_new_query = ”; //set a custom query here
 $widget_ops = array(‘classname’ => ‘newsbox’, ‘description’ => ‘A Sidebar widget to display latest post entries in your sidebar’ );$this->WP_Widget( ‘customcptbox_post’, THEMENAME.’ Latest CPT Nieuws’, $widget_ops ); 
 }
 }
 register_widget( ‘avia_customcptbox_post’ );
 }When I replace the custom taxonomy “nieuws_cat” with the standard category taxonomy the widget stops functioning. 
 Any idea how to fix this?I don’t mind to use the custom taxonomy but then I would like to be able to hide this taxonomy category in the meta info beneath the post title. Best regards, 
 ArjanFebruary 8, 2015 at 9:33 am #392661Hey Arjan de Wit! Thank you for using Enfold. Please provide a link to the actual page with widget. The category beneath the post title should not be included by default. Cheers! 
 IsmaelFebruary 9, 2015 at 11:09 am #392932This reply has been marked as private.February 10, 2015 at 9:28 am #393562This reply has been marked as private.February 12, 2015 at 1:01 pm #394957Hey! Alright. Use this to hide the category: span.blog-categories.minor-meta, .text-sep-cat { display: none; }Best regards, 
 IsmaelFebruary 12, 2015 at 1:57 pm #394984Hey, I don’t want to hide the category completely. I want to hide “test” from showing up, but I still want to show “Publicatie” as a category. Best regards, 
 ArjanFebruary 12, 2015 at 3:54 pm #395098Hi! Remove the code above then use this on the functions.php file: add_action('wp_footer', 'ava_remove_test', 10); function ava_remove_test(){ ?> <script> (function($){ $(window).load(function() { $( "span.blog-categories.minor-meta a:contains('test')" ).css( "display", "none" ); }); })(jQuery); </script> <?php }Regards, 
 IsmaelFebruary 12, 2015 at 4:00 pm #395107Seems like this solutions only works for “test”, but what if the testtax taxonomy contains multiple categories? It need to filter out a complete taxonomy not a category from this taxonomy (in this case test) February 12, 2015 at 4:10 pm #395118Let’s get back to the real problem: This works: 
 $this->avia_term = ‘nieuws_cat’;
 $this->avia_post_type = ‘nieuws’;This doesn’t work 
 $this->avia_term = ‘category’;
 $this->avia_post_type = ‘nieuws’;I need the CPT widget to work with the category taxonomy and the cpt nieuws. February 13, 2015 at 11:13 am #395580But that widget doesn’t support custom post types… February 13, 2015 at 1:30 pm #395689Hi! How many custom post types do you have? Try the solution provided here to create widgets for different custom post types: https://kriesi.at/support/topic/multiple-versions-of-latest-cpt-widget/#post-369273 Regards, 
 IsmaelFebruary 13, 2015 at 2:20 pm #395735The solution mentioned in that topic (the topic I started!) is the solution I’m using right now.But I have to use a different taxonomy or else it won’t work. Which bring me back to the original question: is it possible to use a modified version of the Enfold latest News widget that supports custom post types AND the normal category taxonomy. February 13, 2015 at 5:21 pm #395881Ok I found a solution.So this topic can be closed. 
- 
		AuthorPosts
- The topic ‘Custom CPT widget’ is closed to new replies.
