Welcome To Snipplr
Everyone's Recent Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Show only children posts of a parent custom post type, not all child posts
0
1950
posted 12 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
1178
posted 12 years ago by i-am-andy
Show all child pages content and featured image on the parent page
0
1275
posted 12 years ago by i-am-andy
Wordpress 3.3 custom post type query that will get all of the taxonomies, loop through them, and output the posts from each.
0
913
posted 12 years ago by dolbex
then in your template code you just use..
echo excerpt(25);
1
677
posted 12 years ago by Omegakenshin
Register a Custom Post Type and a Custom Taxonomy in Wordpress
0
1159
posted 12 years ago by i-am-andy
Wordpress by default wraps images in <p> tags, this kills that.
3
1007
posted 12 years ago by rliverman
Ever want to filter out a category from your blog page. Here's how you do it! Just add this snippet to your functions.php file.
0
765
posted 12 years ago by goatboy91587
Use this in your functions.php
Sets one language for WP Admin and the other for front-end.
2
792
posted 12 years ago by mihael
In this example I used the "Members" plugin to add a capability called "hide_jobs" and that was the trigger to hide certain admin menus and also hide the "Right Now" dashboard widget.
0
1054
posted 12 years ago by rliverman
Reduce spam on WP installations (comment spam); this snippet does not look for https referers.
0
1154
posted 12 years ago by no4h
Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
1
921
posted 12 years ago by adambundy
function that creates a template tag that can be used to insert excerpts with different lengths. Also controls characters that come after excerpt
0
755
posted 12 years ago by verticalgrain
UPDATE: might be easier or faster to use this now (also courtesy Pippin): http://pippinsplugins.com/get-all-attached-media/
**courtesy Pippin Williamson (http://pippinsplugins.com/image-gallery-short-code-using-post-attachments/)
use shortcode...
1
973
posted 12 years ago by adambundy
Adding custom fields to the quick edit panel in Wordpress is easy using built-in hooks. However, the hook to add fields seems to be called multiple times, adding duplicate fields to the quick edit panel. Adding this code to the top of the function be...
0
828
posted 13 years ago by briteweb
Code snippet to create custom post type FAQ and custom taxonomy Topics in WordPress v. 2.9.2+
1
863
posted 13 years ago by mommygeekology
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.
3
1429
posted 13 years ago by f6design