Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 27 28 29 30 31 ... 42
Loads WordPress header for external functions like get_option();
0 1768 posted 15 years ago by vagrantradio
For example, when you can't get the post author to shop up using the_author(); it usually means your working outside the loop while that function is meant to work inside the loop. This is a way around it. (got it from the forums)
0 1304 posted 15 years ago by Rembrand
0 1374 posted 15 years ago by fatihturan
passing php variables to javascript with build-in function 'wp_localize_script'.
1 1809 posted 15 years ago by screamwork
Wordpress - 404 problem on physical directories. From the Support Forum.
0 1318 posted 15 years ago by kyuumeitai
This will fetch the custom post types, displayed as a list with their respective permalinks.
0 2105 posted 15 years ago by ivorpad
Pulling posts from outside wordpress (in the right way!) as a response for this snippet: http://snipplr.com/view/39523/pulling--posts-from-outside-wordpress/
0 2365 posted 15 years ago by bronet
Returns an HTML string of taxonomy terms associated with a post and given taxonomy. Terms are linked to their respective term listing pages.\r\n\r\nThis is for when a custom taxonomy is registered for a custom post type.
2 2322 posted 15 years ago by Jamie
Use this to remove or change the wp-admin footer text. Default is Thank you for creating with WordPress.
1 1626 posted 15 years ago by Farhan
<p>Add this line to &quot;functions.php&quot; in your theme directory to remove RSS feeds specific to categories. The primary blog RSS feed will still be accessible. </p><p>Taken from a post by Hollywood grind on the Wordpress.org forums.</p>
0 1720 posted 15 years ago by rgsmith007
This may be necessary to properly add theme support for multiple menus.
0 1807 posted 15 years ago by Jamie
To exclude pages from wordpress search results include the following in your theme's functions.php
0 1405 posted 15 years ago by myke
You will need to add “define(‘WP_ALLOW_MULTISITE’, true);” in your wp-config.php to make the multisite function accessible. If you want to copy paste, use the code block below:
0 1351 posted 15 years ago by myke
Display random posts without a plugin
4 1963 posted 15 years ago by DanielPaul
By default wordpress does not include post thumbnails in RSS Feeds. Enable in by add this code the functions.php located inside your themes folder.
1 2333 posted 15 years ago by mediamilan
0 1282 posted 15 years ago by jamiebrwr
This custom function is useful if you want to get the ID of a page.
1 1822 posted 15 years ago by simonbouchard
Place into fucntions.php
3 1445 posted 15 years ago by jamiebrwr
Place into fucntions.php
0 1458 posted 15 years ago by jamiebrwr
This code will list all children pages from a parent page. This method is useful when you don\\\'t want to list all parent pages when you are on a parent page that have no children pages.
0 1458 posted 15 years ago by simonbouchard
Place into fucntions.php
0 1550 posted 15 years ago by jamiebrwr
Place into fucntions.php
1 1351 posted 15 years ago by jamiebrwr
Place into fucntions.php
0 1572 posted 15 years ago by jamiebrwr
1 ... 27 28 29 30 31 ... 42