Attachment Page Mod
-
So what I’m trying to do is take my attachment page, and link the picture to the site. Right now it’s linking to the next page in the series using this code:
<a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment">
The way I can think of is by putting in a custom field into the blog post say site_url, but using something like this doesn’t work:
<?php echo get_post_meta($post->ID, "site_url", true); ?>
because the attachment doesn’t really appear to be part of the blog.My next suggestion was to put the URL in say the image description and call the URL like I call the title:
<?php echo esc_attr( get_the_title() ); ?>
but is that really the best way to go? Plus I can’t seem to find the code to call the image description anyway.
Any help on this would be great
- The topic ‘Attachment Page Mod’ is closed to new replies.