Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 30 31 32 33 34 ... 42
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 1488 posted 15 years ago by creativelifeform
Just go to your classes.php file line 1332 and replace this line
1 1964 posted 15 years ago by creativelifeform
Originally written by Dimox
4 1596 posted 15 years ago by creativelifeform
Source: http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/
0 1818 posted 15 years ago by chrisjlee
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 4877 posted 15 years ago by bdnnikki
A quick snippet of the PHP/Wordpress code behind my archive page, mainly for @andypoppins :D
0 1169 posted 15 years ago by psdesignuk
1 1517 posted 15 years ago by chrisdpratt
This will let you define individual templates for posts within specific categories. Simply name your post file like: single-SLUG.php
0 1051 posted 15 years ago by creativelifeform
catches the first image of a post so you can display it however you like within the loop
0 1063 posted 15 years ago by creativelifeform
courtesy of mark8barnes
1 1506 posted 15 years ago by iroybot
courtesy of mark8barnes (http://wordpress.org/support/profile/52354)
1 1661 posted 15 years ago by iroybot
Must be placed after the_post() so make sure you verify that if you place it in the sidebar.
0 2057 posted 15 years ago by Overdeath
4 1643 posted 15 years ago by adambundy
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 1394 posted 15 years ago by Kokkekniven
0 861 posted 15 years ago by runeg
1 1338 posted 15 years ago by vagrantradio
All it takes is a stylesheet and a small function in the theme’s functions.php file
1 1405 posted 15 years ago by math89
0 1286 posted 15 years ago by gd6d
Change the excerpt value in functions.php
0 1369 posted 15 years ago by howardpanton
Add read more link for wordpress
0 1509 posted 15 years ago by howardpanton
Count the number of comments in wordpress blog
0 3017 posted 15 years ago by howardpanton
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 1369 posted 15 years ago by kristarella
1 ... 30 31 32 33 34 ... 42