kirk-t
Forum Replies Created
-
Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?Yes, a dedicated attachment page template is what I use, and the only thing in there is that line of code. I only use it for the image attachment template, so just drop a file called “image.php” in your theme directory and have this line in there:
<?php wp_redirect(get_permalink($post->post_parent)); ?>I’ve been using this for a while now on several site with no problems, so I hope it helps. Let me know if you run into any trouble.
Forum: Plugins
In reply to: Custom feed of Video Category link back to post?The Working Solution
Simple fix – I just used get_the_permalink() and get_the_title() instead. Everything seems to be working great. Below is the final code used.
add_filter('the_content','video_feed'); function video_feed($content) { if ( is_feed() && in_category('Video') ) { $content = $content . '<p><a href="' . get_permalink() . '" title="View the Video for ' . get_the_title() . '">Click Here</a> to view the video.</p>'; } return $content; }Forum: Themes and Templates
In reply to: Attachment page Redirect to Post page – How To?Found this solution a while back:
Make an image or attachment page template with the following line:
<?php wp_redirect(get_permalink($post->post_parent)); ?>Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?Well, I didn’t find much. This link below seems to be the only one I bookmarked that might lead to some sort of working solution. I didn’t really pursue it since my goal was different than yours, but hopefully this will lead to something. Enjoy.
Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?That makes perfect sense…I definitely see the need for that now…
I’ll go back through my notes to see if I ran across any solution for it. I don’t remember it, so don’t set your hopes too high, but stay tuned…I’ll keep you posted.
Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?That’s what I thought you meant…sorry I can’t help with that…
What’s the scenario where you want to do this? Why are people getting to the actual JPG image anyway? There might be another solution depending on the scenario.
Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?Do you mean redirect to the actual file, or redirect the file somewhere else?
Either way, I’m not sure how…this solution works for me since the RSS links to image files seem to go instead to the attachment page…so redirecting the attachment page to the post page has worked for what I need.
Forum: Plugins
In reply to: Redirect Attachment page to Post page – How To?Just replaced entire attachment page template with this:
<?php wp_redirect(get_permalink($post->post_parent)); ?>and it seems to do the job.
Forum: Plugins
In reply to: Restrict Users from Editing their Profiles?Yes, but can’t find one that accomplishes this. I even hoped WPLite would do the trick, but the one page is won’t hide is the Profile page.
I’ll keep looking in the meantime.
Forum: Themes and Templates
In reply to: How to display ALL images in gallery with image.php