Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 10 11 12 13 14 ... 42
Add to bottom of your theme's functions.php file
0 1636 posted 15 years ago by RainyDayMedia
Removing the generator tag for security purposes... add to the bottom of your theme's functions.php file
0 1710 posted 15 years ago by RainyDayMedia
Add to the bottom of the your theme's function.php file. Change to your site's name
0 2249 posted 15 years ago by RainyDayMedia
For those of use who use Wordpress as a CMS, this gives you the option of hiding all your dashboard widgets, for all users. <br>**Open your theme’s functions.php file located in your theme’s folder. Copy this script, paste it at the bottom of y...
0 2260 posted 15 years ago by RainyDayMedia
add this in functions.php
0 3083 posted 15 years ago by IronMANro
Paste this code at the top of your .php file. You can choose this new site template when creating a new wordress site.
0 1044 posted 15 years ago by rofthedeep
<?php> will random load images named (in this example) image_1.jpg up to image_5.jpg
0 3009 posted 15 years ago by DeluxiveState
This small snippet can be used to get the children and grand children of a Wordpress page. See the comments for how it works
0 2722 posted 15 years ago by jvandemerwe
Using the ID of a page, you can get the content, the featured image and the title to power widgets in your template.
0 1852 posted 15 years ago by mejamiewilson
0 1622 posted 15 years ago by distribuida
Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
0 2643 posted 15 years ago by Huskie
No modifications or testing carried out yet.
0 2725 posted 15 years ago by Huskie
Could possibly be simplified to maximise efficiency. It relies on a separare WP Sleek framework function sleek_get_theme_menu_name. This could ideally be improved to allow the theme location to passed as a parameter somehow.
0 2703 posted 15 years ago by Huskie
use in template <?php> sau <?php>
0 1642 posted 15 years ago by IronMANro
0 1396 posted 15 years ago by distribuida
0 1608 posted 15 years ago by distribuida
I use this to toss all the junk from the header, add a favicon, remove useless admin elements, and block WordPress' ancient jQuery file from embedding.
0 1790 posted 15 years ago by ethicka
Add this to the functions.php file. Make sure the Admin Bar is set to show when viewing site. You will see in the Admin Bar the current page template that is being used.
0 1865 posted 15 years ago by jeremyjared74
0 1172 posted 15 years ago by imaginarydesign
Add code to theme functions.php file.
0 2326 posted 15 years ago by Huskie
Usage: <?php>post_excerpt; if($textin == ""){ $textin = $post->post_content; } echo TruncateText($textin, 150); ?>
0 1673 posted 15 years ago by tcelestino
Useful snippet for getting a specific number of posts from a specific category, useful for news listing in sidebar
0 1811 posted 15 years ago by i-am-andy
declare all custom fields first
0 1689 posted 15 years ago by mesh606
Instead of requiring the loop.php file in your custom themes you can use there two functions, placed in your functions.php file to not only automatically include it, but make a dead simple to filter sections out on a page by page basis negating the n...
0 1916 posted 15 years ago by FatFolderDesigner
1 ... 10 11 12 13 14 ... 42