WordPress.org

Ready to get started?Download WordPress

Forums

  1. helgatheviking
    Member
    Posted 1 year ago #

    instead of

    // Add a header hook so we can link to a CSS file
    add_action('wp_head', 'most_shared_posts_head');
    
    // Our header function which'll hook in our CSS file
    function most_shared_posts_head() {
    	echo '<link rel="stylesheet" type="text/css" href="' . plugins_url('most-shared-posts.css', __FILE__). '">';
    }

    shouldn't you use

    // Add a header hook so we can link to a CSS file
    add_action('wp_enqueue_scripts', 'most_shared_posts_style');
    
    // Our header function which'll hook in our CSS file
    function most_shared_posts_style() {
    	wp_enqueue_style( 'most-shared-posts', plugins_url('most-shared-posts.css', __FILE__) );
    }

    http://wordpress.org/extend/plugins/most-shared-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.