Hi,
Add this code:
<div class="alignleft"><?php previous_image_link() ?></div>
<div class="alignright"><?php next_image_link() ?></div>
like here: http://screencast.com/t/hBPGJRf05j
Thanks!
@Marius, thanks this works. This code shows the previous and next image. I added Next and Previous text above the images (not linked). Is there a way to possible style this better and link the Next/Previous text?
Here is how it looks: http://screencast.com/t/t6ZqDRqjO
hi,
make the Prev and Next text to be links with the tag. this tab has an attribute called href where you need to put the same link as the one in the images that appear under Prev and Next text.
take a look at the wp_get_attachment_link function. https://codex.wordpress.org/Function_Reference/wp_get_attachment_link
Thanks for you message.
Radu A.
Hi,
Add this code:<div class=”alignleft”><?php previous_image_link() ?></div>
<div class=”alignright”><?php next_image_link() ?></div>
like here: http://screencast.com/t/hBPGJRf05jThanks!
What I need to do is add these two lines to the file attachment.php? After the change does not display next/prev. What do I do wrong?
Mariusz
Hi, it does not work for me. Now I have in attachment.php:
/domain/wp-content/themes/Newspaper/
...
default:
echo td_page_generator::wrap_start();
?>
<div class="span8 column_container">
<?php
if (!empty($post->post_parent) and !empty($post->post_title)) {
echo td_page_generator::get_attachment_breadcrumbs($post->post_parent, $post->post_title);
}
if (is_single()) {?>
<h1 itemprop="name" class="entry-title td-page-title">
<span><?php the_title(); ?></span>
</h1><?php
} else {?>
<h1 itemprop="name" class="entry-title td-page-title">
<a itemprop="url" href="<?php ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h1><?php
}
get_template_part('loop', 'attachment');
?>
<div class="alignleft"><?php previous_image_link(); ?></div>
<div class="alignright"><?php next_image_link(); ?></div>
</div>
<div class="span4 column_container">
<?php get_sidebar(); ?>
</div>
<?php
echo td_page_generator::wrap_end();
break;
...
Can I do something wrong?
This is source code from browser:
...
<div class="td-attachment-page-content">
</div>
<div class="alignleft"></div>
<div class="alignright"></div>
</div>
...
Hi,
I used the same code:
http://screencast.com/t/l4waoz4Pu9
and works fine: http://screencast.com/t/hjwaY161
Make sure you see an attachment from a post with multiple images attached.
Thanks!
hi,
http://codex.wordpress.org/Function_Reference/previous_image_link
you can read here about this functions: http://screencast.com/t/p8kQzCkgCy
Thanks for you message.
Radu A.
Ive followed these instructions and it does work to a point but the left side image seems to be pushing the right (next) down.
E.g.
http://www.heyuguys.com/peaky-blinders-season-2-trailer-photo-gallery/peaky_blinders_season_2-16/
D
Hi,
Please make sure you add this classes, like this: http://screencast.com/t/FnF2Sq6ZAct
Then use this custom css: http://screencast.com/t/BzQyV4No1S81
.alignleft {
float: left;
}
.alignright {
float: right;
}
Thanks
Can u help us in creating the responsive css for the Previous … Back to Gallery …. NEXT
Here is the sample form attached
Hi,
Use the Media Query Snippets from below to style the the button as you like on mobile/tablet portrait/ table landscape and desktop screens:
/* responsive phone */
@media (max-width: 767px) {
}
/* responsive portrait tablet */
@media (min-width: 768px) and (max-width: 1018px) {
}
/* responsive landscape tablet */
@media (min-width: 1019px) and (max-width: 1200px) {
}
/* responsive monitor */
@media (min-width: 1201px) {
}
Unfortunately we cannot offer custom work as we work hard on the development, updates, fixes and support. You can always get a freelancer from sites like: http://studio.envato.com/ if you don’t know how to do it yourself.
Thanks
