• Hello,

    I have a problem with the Astra code to remove title on pages. When I use the code, it conflicts with the date picker javascript in wpforms plugin. The astra code prevents the date picker from working properly.

    Is there an alternative or updated code I can use to hide page titles without causing issues with other plugins?

    The code with the issue is below:

    /**
    * Disable title on all post types.
    */
    function your_prefix_post_title() {
    	$post_types = array('page');
     
    	// bail early if the current post type if not the one we want to customize.
    	if ( ! in_array( get_post_type(), $post_types ) ) {
    		return;
    	}
    	// Disable Post featured image.
    	add_filter( 'astra_the_title_enabled', '__return_false' );
    }
    add_action( 'wp', 'your_prefix_post_title' );

    Kind regards,
    Sadiq

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘PHP code to remove page title causes conflict with other plugin’s js code’ is closed to new replies.