Profile
Achievement
kristarella's Recent Snippets
- All /
« Prev 1 Next »
With this CSS to make the page 2 main content columns:
.custom #content .sidebar {width:48%; margin-right:2%; float:left;}
1
653
posted 13 years ago by kristarella
This javascripts stops you from clicking on a nav link when there's a submenu below it, and it adds a class of "noclick" to the link, which you can use with CSS to change the cursor and background colour etc.
.menu a.noclick:hover {cursor:default;}...
2
620
posted 14 years ago by kristarella
The code to call the normal Thesis Thumb is at http://snipplr.com/view/38971/thesis-thumbnail/\r\n\r\nTo test whether there is a thumbnail, and if not use another one, use this code in custom_functions.php.\r\n\r\nYou can change the class alignleft t...
0
613
posted 14 years ago by kristarella
Add the PHP to custom_functions.php and the following CSS to custom.css
.custom ul.menu li.search {float:right;}
.custom ul.menu li.search form {padding:0.3em;}
.custom ul.menu li.search form input {padding:0.4em;}
0
847
posted 14 years ago by kristarella
This is designed to show 10 posts on each of the pages after the home/blog page when the home page only shows 5 (because if you just use posts_per_page=10 without the offset you will lose the most recent posts numbered 6-10 in between the first and...
0
627
posted 14 years ago by kristarella
Completely changed original function, which stopped working around WP2.8.
1
801
posted 15 years ago by kristarella
This creates a custom HTML header in Thesis with a logo and an advert section (to be used instead of CSS image replacement).
Example CSS to use with it:
.custom #header:after {content:"."; display:block; height:0; clear:both; visibility:hidden;...
5
911
posted 15 years ago by kristarella
This used to be code adapted from Z'Oc, but I decided to start again and write it fresh with WP_Query instead of get_posts.
3
764
posted 15 years ago by kristarella
This turns the about page into a featured category post page. The principles for just a regular custom page template with sidebars is there too.
3
1382
posted 15 years ago by kristarella
This provides a teaser, with content from a custom feild, or the excerpt if no field exists. Everything except the title and edit link need to be turned off in the options.
3
821
posted 15 years ago by kristarella
Use [short] in a post to insert the text from the function.
2
765
posted 15 years ago by kristarella
This example is adding a feature box after the first post. You can apply it to any of the hooks inside the loop.
2
739
posted 15 years ago by kristarella
This example adds tags and categories to the Thesis byline, each on a new line, and with the needed classes to match the other byline items.
The byline is generated in thesis/lib/functions/content_functions.php (v1.4.2 at the time of writing) look...
5
838
posted 15 years ago by kristarella
This is a bit of jQuery within a PHP function that you can dump into your Thesis custom_functions.php file to hide comments upon page load and add a link to show them.
2
745
posted 15 years ago by kristarella
An example of how to write your own navigation with dynamic "active" classes.
3
1014
posted 15 years ago by kristarella
Use with (in custom.css) .sidebar_box {margin-bottom:2em; text-align:center;}
You may have to adjust the width for your sidebars.
2
920
posted 15 years ago by kristarella
The function content should work in any theme, it's just wrapped in a function wrapper for insertion into the Thesis theme.
2
919
posted 15 years ago by kristarella
This CSS is nice to use with this function:
.custom .avatar {float:left; border:3px solid #ddd; margin-right:1em;}
2
839
posted 15 years ago by kristarella
This shows how to add content (in this case a linked image) to the end of a post using WordPress custom fields and the Thesis theme.
6
951
posted 15 years ago by kristarella