Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 36 37 38 39 40 ... 43
0 652 posted 14 years ago by gd6d
0 586 posted 14 years ago by gd6d
0 537 posted 14 years ago by gd6d
0 524 posted 14 years ago by gabbo
0 590 posted 14 years ago by gabbo
This makes template code that applies to children of a particular page much more readable, especially if you can use a page path instead of an ID: `if ( is_child_of( 'topic/subtopic' ) ) :`.
1 720 posted 14 years ago by cyberhobo
the numbers 108 and 18 are the category ids i wanted to exclude
0 532 posted 14 years ago by crs
Function to add custom body class in th Thesis theme for WordPress...Thanks to @girliegeek!
1 784 posted 14 years ago by joelhaus
Search Engine Optimisation, or SEO is something that a lot of bloggers get obsessed about, whilst others think it’s a load of rubbish. I’m halfway between the two – whilst I believe that you can change certain things to better SEO your content,...
0 491 posted 14 years ago by paulgrenwood
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 639 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 544 posted 14 years ago by paulgrenwood
Allow Visitors to Email Posts to Their Friends
0 517 posted 14 years ago by paulgrenwood
1 579 posted 14 years ago by paulgrenwood
For use in conjunction with the get_work function in the theme functions template, functions.php.
0 506 posted 14 years ago by tylersticka
For use in the theme functions template, functions.php.
0 498 posted 14 years ago by tylersticka
For use within The Loop, in your portfolio item page template.
0 624 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 634 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 904 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 646 posted 14 years ago by cyberhobo
Create a custom 404 handler page which redirects you to the correct page.
1 586 posted 14 years ago by Meander365
1 1037 posted 14 years ago by dsheetz
1 ... 36 37 38 39 40 ... 43