Title: Link Library Plugin broken?
Last modified: September 12, 2016

---

# Link Library Plugin broken?

 *  Resolved [acgresearch](https://wordpress.org/support/users/acgresearch/)
 * (@acgresearch)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/)
 * I tried to upgrade from “5.9.12.16” to “5.9.13.4” but things broke.
 * Specifically, it appears that custom “style sheets” no longer work.
 * I reset the styles and applied them again. I debugged the main “link-library.
   php” a bit and near as I can tell, the chunk of code that should be loading the
   style sheet is NOT getting called.
 * The function “conditionally_add_scripts_and_styles” is getting called repeatedly,
   but ends up setting the “$llstylesheet” global variable to false, which means
   custom styles don’t get set.
 * I used the same debugging on my “5.9.12.16” version and the global variables 
   ends up being set to true, which means the styles DO get loaded.
 * I don’t have a good enough understanding of this plugins architecture yet to 
   provide a workaround, so hopefully this will be enough to get the developer started.
    -  This topic was modified 9 years, 9 months ago by [acgresearch](https://wordpress.org/support/users/acgresearch/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8177768)
 * I just tested the latest version of Link Library for this and my custom stylesheet
   properly gets loaded on the site when I visit the page where I placed the link-
   library shortcode and do not appear on other pages of the site.
 * Are you using the Link Library shortcode to display your links? Is this on a 
   page or post? Are you displaying your page in the main post / page contents or
   in a widget?
 * Thanks for providing more information so I can try to reproduce the issue.
 *  Thread Starter [acgresearch](https://wordpress.org/support/users/acgresearch/)
 * (@acgresearch)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8178033)
 * Yes, I am using the shortcode: [link-library settings=”1″]
 * It is on a page, not a post. And it is the main content of the page (not a widget).
 * It appears to have something to do with the theme (although it had worked fine
   with “5.9.12.16”). If I change to the “2016” theme, the style sheet gets applied.
 * The theme is “Asteria Lite”: [http://www.towfiqi.com/asteria-lite-free-wordpress-theme.html](http://www.towfiqi.com/asteria-lite-free-wordpress-theme.html)
 * It is weird that the old version seemed to work fine. For whatever reason, the
   function “conditionally_add_scripts_and_styles” is called like 5 times. And by
   the 5th time it sets the “$llstylesheet” variable to “false” which then skips
   the stylesheet loading code. The “5.9.12.16” code only calls the function twice
   and “$llstylesheet” is set to “true” on the second call.
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8178077)
 * It is probably getting called multiple times since the theme goes through multiple
   post loops to display its content, and the hook that I am using is tied to the_posts.
   The other theme that you switched to goes through less iterations.
 * I just created a modification to link-library.php to check the previous value
   of llstylesheet and leave it to be true if it was already set to be true. That
   should help with the flag getting set to a negative value after multiple loops.
 * [https://gist.github.com/ylefebvre/62ef945ae71b1bae56d879bad690f101](https://gist.github.com/ylefebvre/62ef945ae71b1bae56d879bad690f101)
 * Can you download this replacement file (only replaces link-library.php) and see
   if it helps with the issue?
 * Please let me know if this helps and consider donating to support this plugin’s
   development.
 *  Thread Starter [acgresearch](https://wordpress.org/support/users/acgresearch/)
 * (@acgresearch)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8178201)
 * Yes, that did it! I assume this will carry over into future releases…
 * I very much appreciate the support and will consider donating as suggested.
 * Thank you!
 *  Plugin Author [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * (@jackdewey)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8178223)
 * Yes, I will release this modification shortly. Just wanted to check if it helped
   before pushing it out.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Link Library Plugin broken?’ is closed to new replies.

 * ![](https://ps.w.org/link-library/assets/icon-256x256.jpg?rev=971117)
 * [Link Library](https://wordpress.org/plugins/link-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/link-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/link-library/)
 * [Active Topics](https://wordpress.org/support/plugin/link-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/link-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/link-library/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Yannick Lefebvre](https://wordpress.org/support/users/jackdewey/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-broken/#post-8178223)
 * Status: resolved