Forums

BNS Inline Asides
[resolved] Hardcoded plugin path (6 posts)

  1. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    Hi Cais,

    This is a really cool plugin. I installed it on my test server which uses a separate domain for plugins. This is causing the stylesheets to not be included.

    echo '<link type="text/css" rel="stylesheet" href="' . home_url( '/' ) . 'wp-content/plugins/bns-inline-asides/bnsia-style.css" />' . "\n";

    could be replaced with:

    wp_enqueue_style( 'taxonomy-list-shortcode', plugin_dir_url( __FILE__ ) . '/bnsia-style.css', array(), 'your-version-number-here', 'screen' );

    and then hook the function into wp_print_styles

    Best,
    -Mike

    http://wordpress.org/extend/plugins/bns-inline-asides/

  2. Edward Caissie
    Member
    Posted 1 year ago #

    Thanks, Mike;

    I'll take a look at this ...

  3. Edward Caissie
    Member
    Posted 1 year ago #

    @Mike - have a look at version 0.4.1
    It adopts your suggestion of using wp_enqueue_style()

    Thanks!

  4. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    Awesome! Will do tomorrow for sure!

  5. Michael Fields
    Theme Wrangler
    Posted 1 year ago #

    Totally fixed it for me! Thanks for the fast update :) Closing this thread as resolved.

  6. Edward Caissie
    Member
    Posted 1 year ago #

    Thanks for the feedback! Glad this update fixed the issue you were seeing, too. I'll be porting similar updates to my other plugins as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic