Custom Fields
Re-Envisioned
Support General CSS + jQuery + Bootstrap4 Optimization

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 2 months, 1 week ago.

  • Creator
    Topic
  • #15296

    Ben Wills
    Participant

    I just purchased this a week ago and am really loving it. Thank you for such a great piece of software.

    After getting a bunch of posttypes, forms, etc, set up, I’m now in the process of optimizing front-end page load speed (I’m using MB Custom Tables on the backend) and customizing the design.

    There are a few things I’d like to do. Can you give me some pointers on these?

    • How can I move the CSS inserted near the footer (e.g. /meta-box/css/style.css and others) back up into the head of the document?
    • Metabox automatically loads jQuery from WordPress (/wp-includes/js/jquery/jquery.js), which is v 1.12.4. To avoid using multiple versions of jQuery, I’d like to use the most recent included in Bootstrap4 (jquery v3+). Can I remove the /wp-includes/js/jquery/jquery.js files included by Metabox?

    Thanks for any help you can provide on this.

    Ben

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #15297

    Anh Tran
    Keymaster

    Hi Ben,

    These are interesting questions!

    • CSS: in the MB Frontend Submission extension, the CSS is outputted in the same location as the form. It’s not in the header nor footer. The plugin uses wp_enqueue_style to output the CSS. Unfortunately, this function doesn’t support the location of the CSS (header, footer). I’d suggest optimizing the CSS with a minify plugin like Autoptimize.
    • jQuery: jQuery is registered by WordPress and you should not remove it. A safe way to use the latest version of jQuery is using the plugin Use Google Libraries or this technique. In either way, please test it first.
Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.