Created
December 12, 2016 14:14
-
-
Save jpen365/4fd186ebb2122936fbbeea254e9c2000 to your computer and use it in GitHub Desktop.
Redirect attachment pages to the parent post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php wp_redirect(get_permalink($post->post_parent)) ; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment