Deactiveting post images goes to picture's page on homepage
-
Hi Alexa and everyone,
When I click any a image on my homepage in any post it goes that image’s page and shows just image. I want to change this function with like continue reading. So when I clicked to image, it’ll go to releated post.
I found a code for this function.But I couldn’t replace it correctly.
Because there is some nearly same codes and I think they are crashing when I replaced it in image.php file.Can you tell me how should I replace it for as I told and useable for most using pages like home,category page,author page.THAT CODE:
<?php wp_redirect(get_permalink($post->post_parent)); ?>
Code is IN MY IMAGE.php :
….
$metadata[‘width’],
$metadata[‘height’],
esc_url( get_permalink( $post->post_parent ) ),
get_the_title( $post->post_parent )
);edit_post_link( __( ‘Edit’, ‘sugarspice’ ), ‘<span class=”edit-link”>’, ‘</span>’ );
…
- The topic ‘Deactiveting post images goes to picture's page on homepage’ is closed to new replies.