Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
How to get a custom product attribute inside a view (.phtml) file.
        
        
        
            0 
        
        
            1094 
        
                    posted 15 years ago by TioSolid
            Allows you to read any config in the magento database based in its path. The path is defined inside the system.xml file of the module. The table is core_config_data
        
        
        
            0 
        
        
            1256 
        
                    posted 15 years ago by TioSolid
            The first thing to do is to create header files. Create as many different headers as you want. In this exemple, I have created 3 custom headers from my theme default file header.php, names headercontact.php, headergallery.php and headerdefault.php....
        
        
        
            1 
        
        
            1535 
        
                    posted 15 years ago by stephcode
            Replace "getMyAttribute" with "get" followed by the attribute name in camel case.
        
        
        
            0 
        
        
            1040 
        
                    posted 15 years ago by Groove
            Use this function to filter your first and last menu items and assign them each a specific class name. This is very handy when applying separators in CSS but want to exclude the first and/or last items.
        
        
        
            3 
        
        
            1303 
        
                    posted 15 years ago by fjarrett
            Add your own text and/or link to the admin footer area. Don\\\'t forget to leave in some credit for WordPress and other helpful links.
        
        
        
            1 
        
        
            956 
        
                    posted 15 years ago by fjarrett
            Clean up your Admin Editor view by removing unwanted meta boxes that create clutter.
        
        
        
            0 
        
        
            980 
        
                    posted 15 years ago by fjarrett
            Keep your WordPress theme code free from harm by removing the Editor link in the Admin Appearance menu.
        
        
        
            0 
        
        
            1023 
        
                    posted 15 years ago by fjarrett
            Clean up your WordPress backend by removing unwanted admin menus that create clutter.
        
        
        
            0 
        
        
            1030 
        
                    posted 15 years ago by fjarrett
            PHP scripting block can be placed anywhere in the document. It always starts with <?php>.
    The example of PHP code below sends the text “Oheon.com†to the browser:
        
        
        
            0 
        
        
            1148 
        
                    posted 15 years ago by Masis
            An example of how to call the dropdown taxonomy term function in the template.
        
        
        
            0 
        
        
            1011 
        
                    posted 15 years ago by fjarrett
            The dropdown taxonomy term function will enable you to show custom taxonomies in a dropdown menu. It supports both hierarchal (category-type) and non-hierarchal (tag-type) taxonomies.
        
        
        
            0 
        
        
            1254 
        
                    posted 15 years ago by fjarrett
            Gets string and length and return string of given length. Makes sure half word in not in the end.
        
        
        
            0 
        
        
            1002 
        
                    posted 15 years ago by nilambar
            Adds support for excerpts in WordPress pages. Great for using WordPress as a CMS. A text field appears in the admin panel and you can pull the excerpt from your template files (for teaser texts etc.)
        
        
        
            0 
        
        
            1144 
        
                    posted 15 years ago by hussong
            
