Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged c



1 ... 68 69 70 71 72 ... 147
0 1503 posted 15 years ago by laurentzziu
Simply replace 'Page Title' with your desired page title to automatically create the page when your theme is activated. Thanks to MattStrange for the original concept.
1 1641 posted 15 years ago by fjarrett
Drop the Zend Framework Library folder into your Vendors folder
0 1729 posted 15 years ago by shahways
**Important: this snipplet has moved to Github.** - [Force the admin theme on additional non-admin paths in Drupal 6](https://gist.github.com/1973090)
3 1979 posted 15 years ago by wildpeaks
0 3944 posted 15 years ago by Farhan
0 1744 posted 15 years ago by sb_01
Snippet for adding to your functions.php file to enqueue jQuery.
1 1623 posted 15 years ago by oriontimbers
1 2022 posted 15 years ago by sadus
If you're importing nodes from a file and have pathauto setup, the existing paths for the nodes will be rewritten with pathauto. To avoid this, simply add the following to the node export array for each node:
0 1518 posted 15 years ago by jonathanpglick
Sale Price/Variation custom this code just work if all variation price is a same as product price
0 1065 posted 15 years ago by haftim
Sale Price/Variation custom this code just work if all variation price is a same as product price
0 1015 posted 15 years ago by haftim
Counts the number of times that a file has been downloaded, using PHP and mySQL
0 1478 posted 15 years ago by eme_dlr
0 1625 posted 15 years ago by sandrews_06
I set up an $isHome boolean variable at the beginning of a template's index.php file so I can easily test the condition throughout the file. To me, the semantic variable name makes the logic more readable.
0 1555 posted 15 years ago by beneberle
**Important: this snipplet has moved to Github.** - [Programmatically log out the user in Drupal](https://gist.github.com/1973079)
0 1614 posted 15 years ago by wildpeaks
Im pretty new to oop php i have tried to create a php search function but im sure this needs alot of improvement. So add on :D
0 1301 posted 15 years ago by JonnySnip3r
You may want to create navigation where the children are displayed only when the parent page is the current page. Place the code in your functions.php file
0 1427 posted 15 years ago by awesomewordpressthemes
Just include **global $user;** and **$user->uid != 1** into the function
0 1798 posted 15 years ago by resting
How to enable Custom Navigation Menus in WordPress 3.0 Like the custom background, header image, and post thumbnails, the custom navigation menus also needs to be enabled through your theme’s functions.php file.
0 1924 posted 15 years ago by johnnyrokkit
The total number of search results can be added in a hook_preprocess_search_results() function from the following variable:
0 1676 posted 15 years ago by jonathanpglick
This will find the first image in post and return it as a thumbnail if it exists
0 2350 posted 15 years ago by howardpanton
1 ... 68 69 70 71 72 ... 147