• Resolved seprita

    (@digitohter)


    Hi Again!

    I have now little problem – Tablepress Single Cell Content Shortcode extension shortcodes have conflict with WP Custom Login plugin code.

    Here ise WP custom Login plugin script:

    <?php
    /*
    Plugin Name: WP Custom Login
    Description: This plugin is adding the header and footer to the login page
    Author: Ninos Ego
    Version: 1.4.8
    Author URI: https://ninosego.de/
    */
    
    if( !isset($_REQUEST['interim-login']) )
    {
    	if( file_exists( get_theme_root() . '/' . get_stylesheet() . '/wp-custom-login.css' ) )
    		wp_register_style( 'wp-custom-login', get_stylesheet_directory_uri() . '/wp-custom-login.css' );
    
    	add_action( 'login_head', 'wp_custom_login_head_javascript' );
    	function wp_custom_login_head_javascript() {
    ?>
    		<script type="text/javascript">
    			wp_custom_login_remove_element('wp-admin-css');
    			wp_custom_login_remove_element('colors-fresh-css');
    
    			function wp_custom_login_remove_element(id) {
    				var element = document.getElementById(id);
    				if( typeof element !== 'undefined' && element.value == '' )
    					element.parentNode.removeChild(element);
    			}
    		</script>
    <?php
    	}
    
    	add_action( 'login_head', 'wp_custom_login_header' );
    	function wp_custom_login_header() {
    		wp_enqueue_style( 'wp-custom-login' );
    
    		do_action('wp_custom_login_header_before');
    		get_header();
    		do_action('wp_custom_login_header_after');
    	}
    
    	add_action( 'login_footer', 'wp_custom_login_footer' );
    	function wp_custom_login_footer() {
    		do_action('wp_custom_login_footer_before');
    		get_footer();
    		do_action('wp_custom_login_footer_after');
    	}
    
    	function wp_custom_login_is_login_page() {
    		return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
    	}
    }

    I have via widget Single Cell Content Shortcodes in page header and with WP Custom Login script enabled I will see only page header until widget with shortcodes in login page.
    Do You have any idea what exactly causing this conflict?

    Tablepress Single Cell Content Shortcode extension works very well. WP Custom Login without Single Cell Content Shortcode shortcodes in header or footer also works very well.

    PS. When I remove Single Cell Content Shortcode shortcodes from header, then login page content will be hidden since the next shortcode (etc in footer).

    https://www.ads-software.com/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I’m not really sure what could be causing this.
    We should try to get some error messages. Could you therefore please set the WP_DEBUG constant to true in the wp-config.php file?

    Regards,
    Tobias

    Thread Starter seprita

    (@digitohter)

    Thank You for help, I didn’t know I can debug problems in this way.
    When I switced WP Custom Login on, I got debug message:

    Notice: wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. Please see Debugging in WordPress for more information.

    Problem source is WP Custom Login invalid code and that’s not Your fault.
    Thank You!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Conflict between Tablepress extension and WP Custom Login plugin’ is closed to new replies.