Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Found this bit of code all over the place, except it missed out a very crucial part of the code which was to add a "-" in front of the ID you wish to exclude. Add this to functions.php in your theme folder.
0
866
posted 14 years ago by creativelifeform
Just go to your classes.php file line 1332 and replace this line
1
1078
posted 14 years ago by creativelifeform
Source: http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/
0
1030
posted 14 years ago by chrisjlee
PHP
Activating the Post Thumbnail feature in Wordpress but not showing anything if there is no image to display
I looked everywhere trying to find some code that could show me how to display the post thumbnail if there is an image, but to display absolutely nothing if there isn't an image to display (most just either added an image or there was a broken image...
1
3390
posted 14 years ago by bdnnikki
A quick snippet of the PHP/Wordpress code behind my archive page, mainly for @andypoppins :D
0
676
posted 14 years ago by psdesignuk
This will let you define individual templates for posts within specific categories. Simply name your post file like: single-SLUG.php
0
578
posted 14 years ago by creativelifeform
catches the first image of a post so you can display it however you like within the loop
0
594
posted 14 years ago by creativelifeform
courtesy of mark8barnes (http://wordpress.org/support/profile/52354)
1
816
posted 14 years ago by iroybot
PHP
Wordpress - Show link to the next and previos brother of the current page, and a link to the page parent
Must be placed after the_post()
1
2485
posted 14 years ago by Overdeath
Must be placed after the_post() so make sure you verify that if you place it in the sidebar.
0
1089
posted 14 years ago by Overdeath
You can see the results under a single post, where photos are shown, without any text. The photo is taken from the uploaded photo from the post. All you need is the get the image plugin from www.justintadlock.com
0
776
posted 14 years ago by Kokkekniven
All it takes is a stylesheet and a small function in the theme’s functions.php file
1
777
posted 14 years ago by math89
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
853
posted 14 years ago by kristarella