/short-assets-url.php

Spend less time hard coding your theme name when linking your assets.

Primary LanguagePHP

Shorten Assests Url

Use short urls to link your theme assets

Usage

In your custom theme, simply call or link your assests as shown:

css

<link href="/css/file_name.css" rel="stylesheet" />

javascript

<script src="/js/file_name.js">

images

<img src="/img/filename.png" alt="..." />

You don't have to type the full path to your assets, the plugin will do that.

all you have to do is make sure your assets are in /wp-content/themes/your_theme/assets or in your theme root under respective names eg. wp-content/themes/your_theme/css.

Supported files

This plugin has been made specifically for css, js and img files.

Auto Installation

Not yet supported.

Manual Installation

  1. Download a release or zip and extract it in to the plugins directory wp-content/plugins/.
  2. Log in to your wordpress dashboard and activate plugin.