Next and Previous in attachement.php

Posted in: Newspaper
Post count: 263

Hey guys, I have inserted this code in attachement.php to try putting the previous and next image of an attached image to the post side by side:

<div class="alignleft">Previous Image<br /><?php previous_image_link(); ?></div>
<div class="alignright">Next Image<br /><?php next_image_link(); ?></div>

Also tried <div class="alignleft" style="display:inline-block;"> Previous Image <?php previous_image_link();?></div> but no luck.

It shows up like so http://screencast.com/t/Unzx4tqB – I am trying to get it side by side like shown in the red. Any suggestions?

Post count: 6600

Hi,

You need to adjust it via css, please add the code then send me an URL to an attachment page of your site, I need to inspect this so I can provide a solution for this.
Also please make sure you have done this I believe it could solve your problem.

Thanks

Post count: 263

Unfortunately adding

.alignleft {
float: left;
}
.alignright {
float: right;
}

into the Custom CSS did not work with either of the codes I tried above. Here is a link http://tinyurl.com/nkchoec (please tinyurl any links you post from the site or a screenshot is just fine). Thanks!

Post count: 6600

Hi,

Use this css: http://screencast.com/t/1cVB1gzS

.alignright, .alignleft {
width: 50%;
float: left;
}
.alignright {
text-align: right;
}
.attachment .mgbox {
clear: both;
}

Thanks

Post count: 263

@Lucian, not sure why this is not working still.

Post count: 6600

hi,

Should work fine, I have tested this live on your site as you can see in the screen, must be something you are not doing right, please make sure you add the custom css in theme panel > custom css save it, also empty cache/ purge files if you use any cache or CDN plugins after this try again, if still dose not work please add this css to style.css file save it and check again.
Please let me know!

Thanks

Post count: 263

Add that code in the Custom CSS area, correct? Done.

In the attachement.php I have:

<div class="alignleft"> Previous Image <?php previous_image_link();?></div>

<div class="alignright"> Next Image <?php next_image_link();?></div>

Is this incorrect in attachement.php?

Post count: 6600

Hi,

I have build and tested that css live on your site based on the code you already have in the attachment file so it should work fine.
Please also make sure that the changes you make in theme panel are saved:
* https://forum.tagdiv.com/topic/cant-save-settings-in-theme-panel/#post-23103
* https://forum.tagdiv.com/topic/theme-panel-dont-save-my-updates/#post-23226

Thanks

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.