Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 33 34 35 36 37 ... 147
Removing the generator tag for security purposes... add to the bottom of your theme's functions.php file
0 592 posted 12 years ago by RainyDayMedia
Add to the bottom of the your theme's function.php file. Change to your site's name
0 687 posted 12 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 744 posted 12 years ago by RainyDayMedia
add this in functions.php
0 675 posted 12 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 305 posted 12 years ago by rofthedeep
<?php> will random load images named (in this example) image_1.jpg up to image_5.jpg
0 734 posted 12 years ago by DeluxiveState
With this file you can load stylesheets and minify the code while changing colors. The stylesheets are loaded using file_get_contents and you can attach them one after another if you have multiple sheets. The colors are replaces based on a variable t...
0 681 posted 12 years ago by FatFolderDesigner
You can use this in Joomla extensions where you need to get the current language locale for example to use with Facebook Connect/Like plugins etc. in the "en_US" format. With facebooj JS, all you have to do is replace the default locale with the resu...
0 775 posted 12 years ago by burconsult
It's not immediately clear from the `context_set()` function how to trigger a context to be "active" using code. Do it like this:
0 596 posted 12 years ago by jonathanpglick
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 853 posted 12 years ago by jvandemerwe
0 697 posted 12 years ago by jose_506
1 888 posted 12 years ago by jose_506
0 567 posted 12 years ago by jose_506
Using the ID of a page, you can get the content, the featured image and the title to power widgets in your template.
0 591 posted 12 years ago by mejamiewilson
0 556 posted 12 years ago by distribuida
This is a custom class for caching results through php's session. The class can be used to cache anything, but i use it to cache mysql results so i don't have to get all the time the results by querying MySQL (wich may take a long time, especialy if...
0 935 posted 12 years ago by TimoZachi
A couple of ideas and options...
0 445 posted 12 years ago by stefpretty
A function that resizes an image to desired width and height, but does not distort the image proportions. Works for JPEG, GIF and PNG.
0 826 posted 12 years ago by TimoZachi
This code snippet gets all information from a YouTube video (title, description, duration, thumbnail url, thumbnail width, thumbnail height, etc..) using the video id and YouTube API.
0 1630 posted 12 years ago by TimoZachi
0 1037 posted 12 years ago by kspal
Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
0 899 posted 12 years ago by Huskie
No modifications or testing carried out yet.
0 955 posted 12 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 964 posted 12 years ago by Huskie
find a mac address using php
0 559 posted 12 years ago by mariraj
0 655 posted 12 years ago by jamiebrwr
use in template <?php> sau <?php>
0 469 posted 12 years ago by IronMANro
1 ... 33 34 35 36 37 ... 147