f6design


Member since 10/01/2010

26 snippets

10 profile views

1 Comment(s) Posted

View their favorites

Profile

All time reputation: 251

Achievement

first submission:submitting first snipplet

f6design's Recent Snippets



« Prev 1 Next »
  1. FAV

    Wordpress: Hide Admin Meta Boxes

    Remove meta boxes from the Wordpress admin area. Useful for simplifying Wordpress' admin interface for your clients. Add this snippet to your Wordpress theme's functions.php file.
    PHP 11 views posted 8 years ago f6design
  2. FAV

    Wordpress: Comma separated list of taxonomy terms

    Create a comma separated list of a post's custom taxonomy terms.
    PHP 14 views posted 8 years ago f6design
  3. FAV

    Wordpress: Disable the content editor for a specific page template

    When adding a meta box to a 'page' in Wordpress (as opposed to a post, or custom post type), you might want to disable the default editor. Use this snippet in your theme's functions.php file to disable the editor for a specific page template.
    PHP saved by 3 people 34 views posted 8 years ago f6design
  4. FAV

    Wordpress: Omit width/height attributes from img tag

    This is an example of omitting the width and height attributes from a thumbnail img tag in Wordpress. Useful if you are working on a responsive design. Use inside The Loop.
    PHP 5 views posted 8 years ago f6design
  5. FAV

    Wordpress: Query a custom taxonomy

    Use WP_Query to query a custom taxonomy, using the tax_query parameter.
    PHP saved by 1 person 13 views posted 8 years ago f6design
  6. FAV

    Wordpress: get current taxonomy

    In Wordpress if you are using a custom taxonomy you can get its details (id, slug, etc) using this snippet.
    PHP 6 views posted 8 years ago f6design
  7. FAV

    Enforce minimum image dimensions in Wordpress

    Add this snippet to your Wordpress theme's functions.php file to reject any image uploads that are below the specified dimensions.
    PHP saved by 8 people 13 views posted 8 years ago f6design
  8. FAV

    Enable post thumbnails for a Wordpress theme

    This snippet adds support for post thumbnails (a.k.a. 'featured images') to a Wordpress theme. It also adds an additional image size for image thumbnails, hard cropped. This second step is optional. Add this snippet to your WP theme's functions.ph...
    PHP saved by 4 people 11 views posted 8 years ago f6design
  9. FAV

    Load jQuery from CDN, fallback to local (for Wordpress)

    Add the following to your Wordpress theme's functions.php file. The jQuery paths/URLs might need to be changed to suite your circumstances.
    PHP 23 views posted 8 years ago f6design
  10. FAV

    Remove unnecessary menu items from Wordpress admin.

    Simplify the Wordpress admin area for clients by hiding menu items. Add this snippet to your Wordpress theme's functions.php file.
    PHP 8 views posted 8 years ago f6design
  11. FAV

    Ensure TinyMCE is loaded for Wordpress (for meta boxes)

    If you are creating a custom post type in Wordpress, and turn off the 'editor' capability, then TinyMCE is not loaded. This means any WYSIWYG meta box textareas will fail. Add this snippet to your theme's functions.php file to load the required TinyM...
    PHP 12 views posted 8 years ago f6design
  12. FAV

    Change position of featured image box in Wordpress

    Add this to your Wordpress theme's functions.php file. It allows you to move the 'featured image' upload/select box from the admin sidebar to another position on the page, to give it more prominence.
    PHP 12 views posted 8 years ago f6design
  13. FAV

    Stop directory index browsing

    This snippet will stop people from snooping in your Apache directories. This is useful if you have directories containing files, but no index HTML/PHP document.
    Apache saved by 4 people 8 views posted 8 years ago f6design
  14. FAV

    Convert all HTML entities in database to actual characters

    Sometimes a legacy database will have HTML entities stored in it. This function converts them. Note that this function assumes you have a database abstraction layer, and may need to be modified to connect to YOUR database.
    PHP 17 views posted 8 years ago f6design
  15. FAV

    Integrate a lightbox with Galleria plugin

    Makes the images in Galleria gallery clickable, so you can see the full sized image in Fancybox (or the ligthbox of your preference). Get Galleria is here: http://galleria.aino.se/
    jQuery 10 views posted 8 years ago f6design
  16. FAV

    100% scale background image (doesn\'t preserve aspect ratio)

    Note that this approach DOESN'T maintain the image's aspect ratio. For a pure CSS technique that does that you need a CSS3 approach.
    CSS 8 views posted 8 years ago f6design
  17. FAV

    Set depth in AS3

    ActionScript 3 saved by 1 person 7 views posted 8 years ago f6design
  18. FAV

    Remove/restore a form field's default value on focus/blur

    If your HTML form fields have a 'watermark' default value, it will be removed when the field is focussed and replaced if focus is lost (and the user has left the field blank). To use give your form field a class of 'default-value'
    jQuery saved by 3 people 10 views posted 8 years ago f6design
  19. FAV

    Get file extension from a string

    PHP saved by 1 person 8 views posted 8 years ago f6design
  20. FAV

    Re-index an array

    Re-indexes an array so that the array keys count up from zero. This is useful if you have previously removed some array nodes.
    PHP 3 views posted 9 years ago f6design
  21. FAV

    Remove empty elements from an array

    Removes 'false', '0', 'null' or '' from the array
    PHP 6 views posted 9 years ago f6design
  22. FAV

    Display current year in PHP

    Useful for displaying copyright notices on a website.
    PHP 10 views posted 9 years ago f6design
  23. FAV

    Draw a rectangle using AS3

    ActionScript 3 saved by 1 person 9 views posted 9 years ago f6design
  24. FAV

    Twitter RSS Feed Parser to display tweets on a website (includes caching)

    To use just edit the Twitter user ID which appears at the bottom of the snippet. You may want to change the location where the tweets are cached, by default they are stored at the root level of your domain. The reason for caching is that Twitter limi...
    PHP 10 views posted 9 years ago f6design
  25. FAV

    Use Google CDN jQuery but fallback to local copy

    Grab Google CDN's jQuery. Fall back to local if necessary, Taken from the HTML5 Boilerplate.
    HTML saved by 16 people 18 views posted 9 years ago f6design
  26. FAV

    Force IE and to use the latest rendering engine and/or Chrome Frame

    Always force latest IE rendering engine (even in intranet) & Chrome Frame. Taken from the HTML5 Boilerplate.
    HTML 5 views posted 9 years ago f6design
« Prev 1 Next »