Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged wordpress



1 ... 7 8 9 10 11 ... 43
Another source: http://wpswitch.com/blog/wordpress/an-introduction-to-wordpress-custom-fields/
0 584 posted 12 years ago by morg7801
Show only children posts of a parent custom post type, not all child posts
0 1273 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 948 posted 12 years ago by i-am-andy
Show all child pages content and featured image on the parent page
0 1037 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 734 posted 12 years ago by dolbex
adds a shortcode
0 423 posted 12 years ago by silviogohl
1 423 posted 12 years ago by madnil
then in your template code you just use.. echo excerpt(25);
1 525 posted 12 years ago by Omegakenshin
Register a Custom Post Type and a Custom Taxonomy in Wordpress
0 954 posted 12 years ago by i-am-andy
Add this within the loop:
0 566 posted 12 years ago by xcsteve99
Wordpress by default wraps images in <p> tags, this kills that.
3 843 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 606 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 667 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 865 posted 12 years ago by rliverman
0 605 posted 12 years ago by swoicik
0 501 posted 12 years ago by swoicik
0 597 posted 12 years ago by swoicik
0 545 posted 12 years ago by swoicik
0 480 posted 12 years ago by swoicik
Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
1 746 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 578 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 776 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 677 posted 12 years ago by briteweb
From CSS-Tricks.com
0 511 posted 12 years ago by wiryanm
Code snippet to create custom post type FAQ and custom taxonomy Topics in WordPress v. 2.9.2+
1 710 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 1207 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 642 posted 12 years ago by f6design
1 ... 7 8 9 10 11 ... 43