github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

ionfish / designate

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 11
    • 0
  • Source
  • Commits
  • Network (0)
  • Downloads (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (1)
    • 1.2
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

WordPress plugin allowing per-post stylesheets. — Read more

  cancel

http://extralogical.net/projects/#designate

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Only use post slugs if post names appear in URIs. 
ionfish (author)
Tue Oct 27 04:34:31 -0700 2009
commit  d3c109baf3997671210431550fe37664e00f71f1
tree    79eeca14d83179730550a85377618f18566558fb
parent  3fae73f12b130e05fafd15e53e01b863cb7012b1
designate /
name age
history
message
file .gitignore Mon Oct 26 15:39:39 -0700 2009 Ignore .DS_Store files. [ionfish]
file LICENCE Tue Oct 27 04:02:26 -0700 2009 Designate is licensed under the GPL. [ionfish]
file README.md Tue Oct 27 04:31:59 -0700 2009 Add README file with usage instructions. [ionfish]
file designate.php Tue Oct 27 04:34:31 -0700 2009 Only use post slugs if post names appear in URIs. [ionfish]
README.md

Designate

Designate is a WordPress plugin by Benedict Eastaugh that allows users to designate stylesheets to customise the appearance of their posts and pages.

Using Designate to style your posts

There are two ways to use Designate: write stylesheets with names that correspond to the posts they're associated with, or choose a particular name by adding a custom field to your post or page.

Where do they go?

Post stylesheets should be placed in the post-styles subdirectory of your WP_CONTENT_DIR directory. Unless you have specified an alternative location for your WordPress content directory, this will be wordpress/wp-content/post-styles. All custom stylesheets must end in the .css file extension.

Post slugs, post IDs

By default Designate uses the permalink slug of a post to generate the name of its custom stylesheet. For example, if a post has a permalink slug of godels-incompleteness-theorems, the generated path will be

wordpress/wp-content/post-styles/godels-incompleteness-theorems.css

If you have several posts with the same permalink slug, you'll want to use post IDs instead of permalink slugs to ensure that each post gets a unique stylesheet name. To enable this option, change the DESIGNATE_USE_POST_SLUGS constant in the plugin file from true to false.

This will give you stylesheets with names like the following (if e.g. the post ID is 27)

wordpress/wp-content/post-styles/post-style-27.css

Overriding stylesheet names with custom fields

You can override either of these options at any time on an individual post or page by adding a custom field to that post or page. The field should have a name of stylesheet, and a value of the filename you wish to use. For example, if you wanted to use a stylesheet called blue.css, you'd put blue.css as the value of the custom field. Just blue would be fine too--the plugin will sort out the file extension for you.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server