Profile
Achievement
adambundy's Recent SnippetsTagged php
- All /
« Prev 1 Next »
PHP
WordPress - redirect to the post instead of archive page when search query returns single result
Courtesy Kevin Chard at WPSnipp.com.
Adding this snippet to the functions.php of your wordpress theme will redirect your search to the post automatically when wordpress only returns a single search result.
1
1348
posted 9 years ago by adambundy
Courtesy CSSTricks (http://css-tricks.com/snippets/wordpress/turn-on-more-buttons-in-the-wordpress-visual-editor/)
1
912
posted 12 years ago by adambundy
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
961
posted 12 years ago by adambundy
Place at the top of your header.php to redirect visitors who are not logged-in to the Wordpress admin. I use this to redirect to a simple HTML 'coming soon' page while sites are in development.
1
863
posted 13 years ago by adambundy