Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 12 13 14 15 16 ... 42
Cut-and-paste the following into your functions.php file (inside of your theme folder). Change the Name-goes-here to whatever you want.
0 1610 posted 14 years ago by redconservatory
Add the following to the top of your .php page
0 1385 posted 14 years ago by redconservatory
0 1307 posted 14 years ago by sudden85
Pulls in 'main-navigation' and 'social-navigation' menus into a single UL. the key is items_wrap => %3$s
0 1677 posted 14 years ago by dan_hoerr
prints "We found 'N' result(s) for 'QUERYSTRING'"
0 1262 posted 14 years ago by dan_hoerr
Ensures the admin scripts or styles will load only on your wordpress plugin settings page: - add_options_page returns a hook_suffix for the settings page of your plugin. - append this value prefixed with a dash (-) to the end of the action you ar...
0 1425 posted 14 years ago by relish
Use in the WP loop. User's registered email account on WP must also be assigned to Gravatar.
0 1376 posted 14 years ago by jacksaidwhat
<?php> <!–Default> <?php> Note that sidebar.php must not always content the sidebar
0 1108 posted 14 years ago by xavsio4
in the theme's footer.php insert <?php>
0 1282 posted 14 years ago by xavsio4
0 1405 posted 14 years ago by xavsio4
Can also be done in your pre built theme
0 1296 posted 14 years ago by xavsio4
Simply paste the code below and insert your Google Analytics where it says paste your Google Analytics. You can paste the code once in your functions.php file and never have to worry about it again. We are adding an action to the wp_footer, so it wil...
0 1534 posted 14 years ago by xavsio4
0 1221 posted 14 years ago by xavsio4
The Logo settings start on line 110 of the commented version.
0 1386 posted 14 years ago by jeremyjared74
I can't access the global $paged variable.
0 833 posted 14 years ago by DanielApt
use <?php>/images/someimage.gif Such a path resolves to .. http://www.yoursite.com/wp-content/themes/YOURTHEME/images/someimage.gif
0 1390 posted 14 years ago by disgruntledillon
Just replace the URL in the fetch_rss line below with the RSS feed to your Twitter favorites. In fact this will work with any RSS feed.
0 1139 posted 14 years ago by jamiebrwr
This gets the content from the page with the ID 22 (change as appropriate on line 1) and echos the first 20 words (change word count on line 8) - can be used on any page inside your Wordpress theme.
0 1251 posted 14 years ago by wahnbriefe
0 1076 posted 14 years ago by akmuraro
Will strip image from content
0 1222 posted 14 years ago by akmuraro
Add this to your functions file
0 1498 posted 14 years ago by coryschadt
Add this to your functions file
0 1360 posted 14 years ago by coryschadt
Found on the wordpress.org forums, courtesy of snails07
0 1118 posted 14 years ago by rgsmith007
0 4397 posted 14 years ago by wpexplorer
1 ... 12 13 14 15 16 ... 42