Yourls: Create own CSS

Created on 6 Dec 2016  路  5Comments  路  Source: YOURLS/YOURLS

Technical details

  • YOURLS version: 1.7.2
  • PHP version: 5.5.21

What are the right way to add own CSS style?
It seems that the article in the wiki is not up-to-date: https://github.com/YOURLS/YOURLS/wiki/Style

All 5 comments

Actually this wiki page relates to a future version of YOURLS. I added this missing information.

A good way to currently do this is to hook into one of the actions of function yourls_html_head() (here) and echo your inline CSS or <script src="some file"></script>

Eg, in a plugin:

yourls_add_action('html_head', 'my_own_css');
function my_own_css(){
    // print some CSS
}

I've created a simple plugin for this with administration page
yourls-custom-header-footer

@scriptgeni nice, added to the plugin list. Thanks!

@ozh hope people will didn't inline css (modern website must don't have inline css)

@julienth37 As you might know, every Wordpress theme has Custom CSS option, this is just a simple plugin to overwrite the Yourls default CSS if you want to have some different styling.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alan-Liang picture Alan-Liang  路  6Comments

Noiden picture Noiden  路  7Comments

jayzisme picture jayzisme  路  7Comments

infotek picture infotek  路  7Comments

youradds picture youradds  路  3Comments