This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Wp-Views conflict with plugins

  • Creator
    Topic
  • #8169
    dezw
    Participant

    Hey there,

    First great Framework! I’m really enjoying it.

    I’m using the Wp-Types and Wp-Views plugins and was experiencing an issue when selecting the Wp-Views shortcode button inside the page / post editor.

    Essentially, when you click on the Wp-Views icon, it brings up a list shortcodes you can use. Among them are Title, Body, Date, Excerpt, etc. This has worked fine with other themes I own, but after uploading Jump Start and installing the recommended plugins, clicking on the Wp-Views icon brings up zero shortcode options — essentially, no shortcodes to choose from.

    I deactivated all of the ThemeBlvd plugins out of curiosity and tried again. This time, it was behaving normally. So I narrowed it down to these two plugins: Theme Blvd Layout Builder and Theme Blvd Widget Areas. If any or both of those are activated, Wp-Types doesn’t show shortcode options in the page / post editor correctly.

    I searched the forums and found this thread.. I eventually ended up using the .js file and functions.php instructions in that thread and it looks like everything is working normally with both the Layout Builder and Widget Areas plugins activated.

    So I just have a few questions:

    1. I copied over the default:

    function my_scripts() {
    	// Register child theme file before Jump Start to override
    	wp_register_script( 'themeblvd_theme', get_stylesheet_directory_uri() . '/assets/js/theme.js', array('jquery') );
    }
    add_action( 'wp_enqueue_scripts', 'my_scripts', 9 ); // Use any priority less than 10 to override Jump Start

    With:

    function my_scripts(){
    	wp_register_script( 'themeblvd_options', get_stylesheet_directory_uri().'/options.js' );
    }
    add_action( 'admin_enqueue_scripts', 'my_scripts', 9 );

    Did I follow the instructions from that thread correctly? All seems to be working, but I just want to make sure copying over and replacing the above default code was what I was supposed to do.

    2. Am I correct in assuming I’ll have to reapply this fix if there is an update to the framework?

    3. Are there any possible issues I might need to be aware of when using this fix?

    I’m comfortable with HTML and CSS, but am admittedly in the beginning stages when it comes to PHP and JS — so I apologize if the answers are fairly obvious. Wp-Types and Wp-Views are actually pretty essential to two different business sites that I’m in charge of. I chose Jump Start for our upcoming “2.0” revamps because it looks to be really flexible and solid, so hopefully everything plays nice.

    Thanks in advance — much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #8172
    Jason Bobich
    Keymaster

    Hello,

    1. … Did I follow the instructions from that thread correctly?

    Sure, the way you did is fine, assuming you’re not making edits to theme.js of your child theme.

    However, if you wanted to keep the ability to edit theme.js, this would be the better solution:

    /** 
     * My scripts for frontend of website
     */
    function my_scripts() {
    	wp_register_script( 'themeblvd_theme', get_stylesheet_directory_uri() . '/assets/js/theme.js', array('jquery') );
    }
    add_action( 'wp_enqueue_scripts', 'my_scripts', 9 );
    
    /** 
     * My scripts for WP admin
     */
    function my_admin_scripts(){
    	wp_register_script( 'themeblvd_options', get_stylesheet_directory_uri().'/options.js' );
    }
    add_action( 'admin_enqueue_scripts', 'my_admin_scripts', 9 );

    2. Am I correct in assuming I’ll have to reapply this fix if there is an update to the framework?

    After you update to Jump Start 1.0.3, whenever that’s released, it would probably a good idea to then remove this part, as it’ll no longer be needed:

    /** 
     * My scripts for WP admin
     */
    function my_admin_scripts(){
    	wp_register_script( 'themeblvd_options', get_stylesheet_directory_uri().'/options.js' );
    }
    add_action( 'admin_enqueue_scripts', 'my_admin_scripts', 9 );

    … But when you update the parent theme Jump Start, this does not mess with your Child theme’s code in any way. This is the concept behind using a Child theme.

    3. Are there any possible issues I might need to be aware of when using this fix?

    I can’t think of anything. The change is really pretty minor. Just make sure to remove this in the next update because this fix and some other new stuff has been added to this javascript file you’re not taking control of from your child theme.

    #8173
    dezw
    Participant

    Great, I appreciate the reply. I’ll make sure to post back if I run into any issues.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.