• Lot’s of extra style sheets and javascript calls are made, including ON THE PUBLIC side of the website, and the path to them is incorrect. The css/js should only be enqueued on the admin side.

    In order to get the Chrome console to stop throwing errors at me, I had to comment out all the places where the js/css was enqueued.

Viewing 5 replies - 1 through 5 (of 5 total)
  • I noticed this too. To keep the JS/CSS off my public pages, I wrapped every case in

    if (is_admin()) {
    [....SOME CODE WITH wp_enqueue_script OR wp_enqueue_style....]
    }

    The following six files were affected:

    • easy-post-types/classes/custom-checkbox/custom-checkbox.php
    • easy-post-types/classes/custom-datefield/custom-datefield.php
    • easy-post-types/classes/custom-image/custom-image.php
      easy-post-types/classes/custom-select/custom-select.php
    • easy-post-types/classes/custom-textfield/custom-textfield.php
    • easy-post-types/custom-type.php

    This succeeded in removing the JS/CSS from public pages but leaving it present on the Admin side.

    Thread Starter pencilneck

    (@pencilneck)

    Thanks figcar, that’s what I ended up doing too.

    I noticed this as well. all of those are getting loaded on the public side for no reason.

    Opera will not load Cufon if there is even 1 empty or 404 stylesheet & with easy post types activated there are 5 stylesheets included with the wrong path.
    If you need to Fix this(all other browsers seem to be more forgiving about this), FTP to wp-content/plugins/easy-post-types/classes

    You have to edit each file listed here:
    custom-checkbox/custom-checkbox.php
    custom-checkbox/custom-datefield.php
    custom-checkbox/custom-image.php
    custom-checkbox/custom-select.php
    custom-checkbox/custom-textfield.php
    In each file you find this line(Sorry Line # are not the same):
    wp_enqueue_style($this->getId().'-style', $this->root. 'style.css');

    Change it to

    wp_enqueue_style($this->getId().'-style', $this->httpRoot. 'style.css');

    The author defines root and httpRoot

    $this->root=dirname(__FILE__).'/';
            $this->httpRoot = plugins_url( '', __FILE__).'/';

    I opened the main plugin file custom-type.php
    and noticed scripts were included correctly if using httpRoot
    so I put 2 and 2 together.

    Now Opera loads Cufon.

    Thanks figcar! This should definitely be included in the next release.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP Easy Post Types] Causes Stylesheet and Javascript problems’ is closed to new replies.