Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged css
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
create two custom fields: one called custom_css and one called custom_js.
1
724
posted 14 years ago by scitrenbaumgmailcom
Insert this code into your functions.php and you'll get a custom CSS box on every page and post. Be sure your theme has wp_head(); in it.
2
1837
posted 14 years ago by Kerrick
In v1.6, the Thesis Theme has a bug which removes a necessary space in the HTML body tag if you add a filter targeting the thesis_body_classes hook. To get the native WP body_class function to work, use this code:
2
1105
posted 15 years ago by joelhaus
Function to add custom body class in th Thesis theme for WordPress...Thanks to @girliegeek!
1
942
posted 15 years ago by joelhaus
Code explains itself. I plan to do a lot more work on it - just wanted to throw it up here for a little sharing. Feel free to take it to the next level.
1
710
posted 15 years ago by brettbergeron
Template Tag body_class
The coming WordPress 2.8 provides a new Template Tag, body_class. This function gives the body element different classes, which gives you the possibility to use it effectively with CSS.
3
611
posted 15 years ago by jessibird
This will create a Navigation from a MySQL database table names. It removes the table name "includes" by default so you can see how to remove any certain tables you wish to not use as a site section. Just plug in your MySQL database details and co...
3
865
posted 15 years ago by jiggyhat
One other thing to note, is that the php generated css file can make use of query parameters, for instance:
<link rel="stylesheet" href="base.css.php?type=alternate" type="text/css" >
in your PHP file you can use the variable:
if ($_GE...
2
1164
posted 15 years ago by dbug13
Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS).
2
1207
posted 16 years ago by YPY
This is like a cms for a stylesheet - includes all files to make a working xhtml/css demo
1
802
posted 16 years ago by perthmetro
Inserts "first" and "last" classes to the first and last items respectively. "first" and "last" classes defined in CSS as without padding.
2
820
posted 16 years ago by nijgnet
Sets the sidebar photo appropriate for a section of the site by determining the parent Page of the subpage.
4
962
posted 16 years ago by nijgnet
CSS files for larger sites can become pretty large themselves. Gzipping or compressing these files has shown to provide a reduction in the neighborhood of 70-80% of the original file size, a fairly significant 'weight loss'.
16
3439
posted 16 years ago by johnself
Removes the core, and node styles from the $style variable.
You most morbably already defined _phptemplate_variables($hook, $vars), in that case just add the two lines there.
_sympal_theme.. is the name of the theme where we use this.
3
892
posted 17 years ago by berkes
Put classes around your bodyy, to allow different colors for seperate pages and areas on your site.
IT will simply add a css-safe version of the first argument in an url. Say the url is /about_us/our_company the class will be
body.about-us
Require...
2
795
posted 17 years ago by berkes
Very simple navigation. Style the id using CSS. Allows you to highlight the current page with CSS.
1
1012
posted 17 years ago by 1man