page attribute templates are not showing except the default and the slider revo

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support page attribute templates are not showing except the default and the slider revo

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28284
    Sujoy Banerjee
    Participant

    page attribute templates are not showing except this two , there use to be a lot of template options available within the dropdown options but all of sudden its showing only those 2 now
    see screenshot for reference :

    #28286
    Sujoy Banerjee
    Participant
    This reply has been marked as private.
    #28299
    Veena
    Moderator

    I don’t see such issue in your site . Pls check the attachment.

    #28312
    Sujoy Banerjee
    Participant

    yea, they started showing again .
    any chance that those options within the template dropdown can turned off or something which i did accidentally ?

    #28333
    Veena
    Moderator

    Not sure what exactly caused this. Using of some plugins may cause this kind of issues .

    #28342
    Sujoy Banerjee
    Participant

    so this same thing happened again and i had to do a deep search and found the actual cause of this :

    Just in WordPress 4.9 there’s this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.

    solution : ( till they release wp 4.9.1 and fix the issue )

    Add the below code in child theme’s function.php file

    
    function wp_42573_fix_template_caching( WP_Screen $current_screen ) {
    	// Only flush the file cache with each request to post list table, edit post screen, or theme editor.
    	if ( ! in_array( $current_screen->base, array( 'post', 'edit', 'theme-editor' ), true ) ) {
    		return;
    	}
    	$theme = wp_get_theme();
    	if ( ! $theme ) {
    		return;
    	}
    	$cache_hash = md5( $theme->get_theme_root() . '/' . $theme->get_stylesheet() );
    	$label = sanitize_key( 'files_' . $cache_hash . '-' . $theme->get( 'Version' ) );
    	$transient_key = substr( $label, 0, 29 ) . md5( $label );
    	delete_transient( $transient_key );
    }
    add_action( 'current_screen', 'wp_42573_fix_template_caching' );
    
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.