Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Displays the attribute label and value by using the attribute code.
This works on the Product Detail page in Magento.
        
        
        
            1 
        
        
            1478 
        
                    posted 13 years ago by axertion
            Getting files, folders, file count, folder count in a directory with php and writing them to a web page
        
        
        
            1 
        
        
            3390 
        
                    posted 13 years ago by duzenz
            need to get the url from a youtube/vimeo embedded code without the querystring's
        
        
        
            0 
        
        
            2456 
        
                    posted 13 years ago by fetz
            I like using public properties, as they greatly aid in API development and proper encapsulation.  Here's my solution for having the ease of public variable getting without the dangers of public variable setting.
        
        
        
            0 
        
        
            1160 
        
                    posted 13 years ago by phpexpert
            gt: greater than
lte: less than or equal to
not IE:  <!--[if> -->
        
        
        
            0 
        
        
            2280 
        
                    posted 13 years ago by webtechdev
            Very helpful function for sorting multi-dimensional arrays
        
        
        
            0 
        
        
            1393 
        
                    posted 13 years ago by chasecrawford
            Como parametro se tiene que tener la cantidad de meses que se desea sumar a la fehc a de inicio
        
        
        
            0 
        
        
            1164 
        
                    posted 13 years ago by serialk89
            The php if statement below checks to see if the content is an archive page. If it is, then it echoes the html structure for meta description tags and also includes the month and year to avoid content duplication.
        
        
        
            0 
        
        
            1426 
        
                    posted 13 years ago by goatboy91587
            Do not allow public to see your dir structure just pleae this code in .htacces
Futther reading
There are two ways to approach this.  The best way to do this is via your .htaccess or httpd.conf file (if you have your own Apache server).  If your h...
        
        
        
            0 
        
        
            2198 
        
                    posted 13 years ago by webtechdev
            This 'Check if HTTPS is on in PHP'  script accounts for servers which set HTTPS differently. Some servers do not set HTTPS, others set it to 'off', etc. Only checking if HTTPS is on will cause an 'undefined index error' in these cases.
        
        
        
            0 
        
        
            1530 
        
                    posted 13 years ago by kf0l
            WordPress top posts: custom post type / taxonomy
Ordered by comment count
        
        
        
            0 
        
        
            2750 
        
                    posted 13 years ago by lswilson
            Disables the design editor in the VE when using a child theme.
        
        
        
            0 
        
        
            1030 
        
                    posted 13 years ago by codepunk
            A class i started to implement, which ended up in a working concept
However I'm not sure if it's a legal way of programming since I unnessesery
changes the structure of php without some real value except nicer structure
For now it remain a conce...
        
        
        
            0 
        
        
            2266 
        
                    posted 13 years ago by Knarf
            Very simple to use Web Poll Class, simply create a new instance, set the question and set the answers. You still have to set up your database yourself
        
        
        
            1 
        
        
            1199 
        
                    posted 13 years ago by RobertHegeraad
            Ordena Array Bidimensional Asociativo de acuerdo a parametro del array.
        
        
        
            0 
        
        
            1150 
        
                    posted 13 years ago by serialk89
            Another source: http://wpswitch.com/blog/wordpress/an-introduction-to-wordpress-custom-fields/
        
        
        
            0 
        
        
            1216 
        
                    posted 13 years ago by morg7801
            Show only children posts of a parent custom post type, not all child posts
        
        
        
            0 
        
        
            2639 
        
                    posted 13 years ago by i-am-andy
            Add a custom ID to the body, useful for when the classes added to the body aren't descriptive enough on pages like Archives and single
        
        
        
            0 
        
        
            1924 
        
                    posted 13 years ago by i-am-andy
            Show all child pages content and featured image on the parent page
        
        
        
            0 
        
        
            2854 
        
                    posted 13 years ago by i-am-andy
            This code is applied from http://www.ultramegatech.com/blog/2009/06/snippet-converting-seconds-to-readable-time/
        
        
        
            0 
        
        
            1139 
        
                    posted 13 years ago by zierocode
            Wordpress 3.3 custom post type query that will get all of the taxonomies, loop through them, and output the posts from each.
        
        
        
            0 
        
        
            1383 
        
                    posted 13 years ago by dolbex
            
