Welcome To Snipplr


Everyone's Recent Snippets Tagged wordpress



1 ... 41 42 43 44 45 ... 48
Whilst there are a number of ways of displaying thumbnails, this is still my favourite (even if it does require the most work!). First, upload timthumb to /wp-content/themes/yourtheme/ and create an image 250px by 250px with your site’s logo and up...
0 619 posted 14 years ago by paulgrenwood
This is something that I wished I’d thought of a long time ago – show other posts in the same series using not a plugin but custom fields. All you’ve got to do for this trick to work is create a custom field ‘Series’ with a link to each oth...
1 533 posted 14 years ago by paulgrenwood
Allow Visitors to Email Posts to Their Friends
0 504 posted 14 years ago by paulgrenwood
1 568 posted 14 years ago by paulgrenwood
For use in conjunction with the get_work function in the theme functions template, functions.php.
0 496 posted 14 years ago by tylersticka
For use in the theme functions template, functions.php.
0 486 posted 14 years ago by tylersticka
For use within The Loop, in your portfolio item page template.
0 613 posted 14 years ago by tylersticka
Usually use in a template with `in_category()`, like `if ( in_category( 3 ) || in_subcategory( 3 ) ) { ...`. Tested in WP 2.8.4.
1 620 posted 14 years ago by cyberhobo
Get the ID of the root (oldest ancestor, parent without parents) page relative to the current page in a WordPress page template. Can be helpful for use with wp\_list\_pages() to create navigation markup.
1 890 posted 14 years ago by cyberhobo
Select the first and last item in an unordered list. As an example, I add a CSS class to each. In WordPress, it's not so easy to get wp\_list\_pages() to generate these classes. jQuery provides an easy out for javascript-enabled clients.
0 827 posted 14 years ago by cyberhobo
There's no has\_children() function in WP 2.8.4, but get\_children() returns false if the post/page has no children, so it can serve the same purpose in a page template. Outside a page template you'd have to add a global declaration for the $post...
2 631 posted 14 years ago by cyberhobo
In addition to the recommendations on the Wordpress Website. Limit the amount of PHP files that a writable by Apache. The directory's and files that need to be writable, do not always need to be executed by PHP directly. This makes it a bit har...
1 539 posted 14 years ago by occam
Create a custom 404 handler page which redirects you to the correct page.
1 573 posted 14 years ago by Meander365
1 1023 posted 14 years ago by dsheetz
0 578 posted 14 years ago by crs
Using this loop variation you can style differently the first and the last post of a loop, or whatever post you like, as lond as you add a new elseif with the number of the post you desire.
5 772 posted 14 years ago by crs
The following will cause the "comments closed" line to not display on both posts and pages.
2 1079 posted 14 years ago by fabi
Adds two "sidebars" to the header. You can drag and drop widgets into them just like any other sidebar from your WP dashboard. You can change the Hook to move the "sidebars" somewhere else on the page. For example, change 'thesis_hook_header' to '...
4 842 posted 14 years ago by fouroclockproject
Completely changed original function, which stopped working around WP2.8.
1 597 posted 14 years ago by kristarella
All you need to do when writing the post, is enter a custom field with the key "expiration" and set the value in the format: "2010/01/01 18:20:00" - this would expire the post at 6.20pm on the 1st January 2010.
1 584 posted 14 years ago by gjindancer
I pieced together this code when I had to do this for a client: - show the first image attached to a post (based on sort order in gallery tab) in medium size - put all the other images attached to the post into an imageset so that when you click on...
1 834 posted 14 years ago by zartgesotten
1 ... 41 42 43 44 45 ... 48