• Resolved victorzelik

    (@victorzelik)


    Hi NateWr,

    I’m having some problems with your plugin. I’ve been looking for the answer in previous topics and found similar issues but not the way to fix them.

    The plugin doesn’t load properly in my Barnelli Theme until I refresh the page. I presume it’s a Javascript conflict, but I’m not confident enough to fix that. The plugin runs perfectly with TwentySixteen Theme. Deactivating all other plugins has no effect.

    Is there a way to solve this problem without having to change either the theme or the plugin? Restaurant Reservations looks perfect for my client, so we would appreciate any advice about it. Maybe we could hire somebody to do the coding?

    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter victorzelik

    (@victorzelik)

    I can’t provide any URL because the website is offline (only admin access while creating the site)

    Hi @victorzelik,

    Have you tried contacting the authors of the Barnelli theme? They will likely have a better idea of what their theme is doing and how to circumvent it.

    In my experience, this problem usually occurs with themes that are using a “pre-loading” feature for “smooth page transitions”. These are prone to causing problems because the theme short-circuits WordPress’s traditional page loading sequence. Some are better than others, but I don’t know if I’ve ever seen a bulletproof one.

    Your theme may have an option to turn off “pre-loading” or “smooth page transitions”, which might help.

    Alternatively, you can try to enqueue the JavaScript and CSS assets into the head of every page on your site. That might circumvent the issue with the theme not loading the assets when it switches to an appropriate page. The following code, included in the functions.php file of a Child Theme, should do the trick, but beware that I haven’t tested this. If you’re not comfortable working with PHP files, you should seek help before implementing it.

    
    function victorzelik_rtb_enqueue_assets() {
    
    	global $rtb_controller;
    	if ( empty( $rtb_controller ) || !function_exists( 'rtb_enqueue_assets' ) ) {
    		return;
    	}
    	
    	$rtb_controller->register_assets();
    	rtb_enqueue_assets();
    }
    add_action( 'wp_enqueue_scripts', 'victorzelik_rtb_enqueue_assets', 20 );
    

    If you’d like to hire someone to test and implement this for you, I’d recommend you contact codeable.io. They match small-scale customization projects like this with qualified freelancers.

    Thread Starter victorzelik

    (@victorzelik)

    Hi again!

    Thanks for such a quick reply.

    I think I’ve solved the problem the easiest way… Your comment about the option included in the theme is the key. I thought I had tried it already, but I’ve checked the “disable Djax” box, and it works!

    On the other hand, I have all the other options you gave me, such as contacting theme’s authors, editing functions.php or contacting codeable.io for the implementation. But I think that will not be necessary at the moment.

    Thanks again for your recommendations and I’ll let you know if there are further issues about this, to help people with the same problem.

    Glad to hear it’s working for you! I’m sure other users of this theme will benefit from your solution. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Plugin is not loading properly’ is closed to new replies.