Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged wordpress
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Another source: http://wpswitch.com/blog/wordpress/an-introduction-to-wordpress-custom-fields/
0
769
posted 12 years ago by morg7801
Show only children posts of a parent custom post type, not all child posts
0
1893
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
1166
posted 12 years ago by i-am-andy
Show all child pages content and featured image on the parent page
0
1266
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
910
posted 12 years ago by dolbex
then in your template code you just use..
echo excerpt(25);
1
672
posted 12 years ago by Omegakenshin
Register a Custom Post Type and a Custom Taxonomy in Wordpress
0
1150
posted 12 years ago by i-am-andy
Wordpress by default wraps images in <p> tags, this kills that.
3
998
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
760
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
785
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
1042
posted 12 years ago by rliverman
Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
1
917
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
748
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
964
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
824
posted 12 years ago by briteweb
Code snippet to create custom post type FAQ and custom taxonomy Topics in WordPress v. 2.9.2+
1
855
posted 12 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
1419
posted 12 years ago by f6design
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