• I installed the plugin and it works but for some reasons it didnt do anything to the calendar widget. I cant select my custom post type like shown in the screenshots. But I see the drop down in “recent posts” and “archives” Am I the only one? Why is it not showing for calendar? I need that feature!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author keesiemeijer

    (@keesiemeijer)

    Hi farou777

    I’m not sure what is going on if you can select it in the other widgets. It could be a conflict with another plugin or your theme.

    First try adding this to your (child) theme’s functions.php file

    
    add_filter( 'cptda_replace_default_core_widgets', '__return_false' );
    

    This will not replace the widgets from WordPress and adds the widgets from this plugin separate. Add the “Custom Post Type Calendar” widget to a sidebar and see if you can select the post type there.

    Thread Starter farou777

    (@farou777)

    Thx for your quick reply. I just tried that and I still don’t see that dropdown… You are right maybe its one of my plugin conflicting? But I do need all the plugins I am using…

    Thread Starter farou777

    (@farou777)

    Hello Keesie, so I tried to set up a new environment to test with ONLY the CPT Archives plugin active (ALL other plugin are deactivated) I still dont see that dropdown… I am running WP 5.2.2 and Total 4.8.5 theme. I can’t find a simple and decent-looking calendar plugin that would allow me to display my CPT… Any idea why this is not working? Thank you.

    Plugin Author keesiemeijer

    (@keesiemeijer)

    I don’t really have a clue why this is happening other than it’s somehow hidden by CSS or a conflict with your theme. The widgets are all registered in the same function. Because the dropdown shows in the other widgets I have no idea why it will not display in the calendar widget.

    For testing add this to your theme’s functions.php file

    
    add_filter( 'widget_form_callback', 'cptda_widget_form_callback', 10, 2 );
    
    function cptda_widget_form_callback( $instance, $_this ) {
    
    	$calendar = $_this instanceof CPTDA_Widget_Calendar;
    
    	echo '<pre>';
    	var_dump( $calendar );
    	echo '</pre>';
    
    	// Check if plugin calendar class is actually used
    	if ( $calendar ) {
    		// It's used
    		$plugin = cptda_date_archives();
    
    		// Display custom post types with date archives added.
    		echo '<pre>';
    		print_r( $plugin->post_type->get_post_types( 'names' ) );
    		echo '</pre>';
    	} else {
    		// Not used
    		echo 'Class used is ' . get_class( $_this );
    	}
    
    	return $instance;
    }
    

    Open the calendar widget and copy the information at the top of the widget and post it here. After that remove the code from your theme’s functions.php file

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Calendar widget not showing post type drop down’ is closed to new replies.