Welcome To Snipplr
Everyone's Recent Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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.
0
785
posted 12 years ago by f6design
Use WP_Query to query a custom taxonomy, using the tax_query parameter.
1
851
posted 12 years ago by f6design
In Wordpress if you are using a custom taxonomy you can get its details (id, slug, etc) using this snippet.
0
864
posted 12 years ago by f6design
Add this snippet to your Wordpress theme's functions.php file to reject any image uploads that are below the specified dimensions.
2
1027
posted 12 years ago by f6design
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...
1
936
posted 12 years ago by f6design
Add the following to your Wordpress theme's functions.php file. The jQuery paths/URLs might need to be changed to suite your circumstances.
0
1278
posted 12 years ago by f6design
Simplify the Wordpress admin area for clients by hiding menu items. Add this snippet to your Wordpress theme's functions.php file.
0
968
posted 12 years ago by f6design
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...
0
804
posted 12 years ago by f6design
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.
0
946
posted 12 years ago by f6design
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.
1
905
posted 12 years ago by f6design
I've yet to work on a WordPress site where at least once post wasn't copied from Microsoft Word, producing a mess of inline tags and awful markup.
This helps prevent that, just a little.
0
713
posted 12 years ago by travishines
Send an email to all registered users when a post is published, for wordpress 3.1+
0
819
posted 13 years ago by eniris
OH MY GOD - ok so this solved a few problems... use this instead of just <body> and you have all the tags you could ever want for applying your css.
0
491
posted 13 years ago by randycaruso
If you would like to insert a cForms form into your WordPress website without using the TinyMCE or Widget function, you can do so by inserting this code in your template.
Replace ‘Default’ with the name given to your form.
0
1098
posted 13 years ago by albertpak98
A custom breadcrumb function for WordPress that I created for a client.
You can pass 2 arguments, the first being the text you want to display in front of the breadcrumb and the second is to hide the home item in the breadcrumb
It will give eac...
1
755
posted 13 years ago by krike
Via http://wordpressapi.com/2011/10/24/wordpress-theme-wysiwyg-editor-default-css/
1
701
posted 13 years ago by BorisDelormas
Returns Wordpress categories as a hierarchical object (i.e. categories with subcategories)
0
534
posted 13 years ago by adamturtle
The admin pages listing the site’s posts and pages come with various text columns (title, tags, categories, author and so on). In order to see what the featured images are, you have to visit each post or page individually. What I will show here, is...
0
894
posted 13 years ago by i-am-andy