ChainKiller
💖 Chevereto Fan
Open app/themes/Peafowl/image.php and find the following code:
Between these divs add another div that will contain you banner code.
Now you have your banner ad above the image, but the image will be pushed below a little (only if the image height is bigger than the viewport) and wont fit the height of the screen.
To fix this find (in the same file):
and add " - 90" before the comma, where 90 is the height of your div. You can find the height with the built in developer tool of your browser or by trying it out.
Request to Rodolfo: can you show me how to get the height with javascript, so if the height of the div changes the we wont have to edit it twice.
For the ads below the image search for:
Between the h1 and div add you ad codes.
To center them give the containing div a class rhen go to style.css and add this
End result:
Code:
<div class="top-bar-placeholder background-black"></div>
<div id="image-viewer" class="image-viewer full-viewer margin-bottom-10">
Between these divs add another div that will contain you banner code.
Now you have your banner ad above the image, but the image will be pushed below a little (only if the image height is bigger than the viewport) and wont fit the height of the screen.
To fix this find (in the same file):
Code:
height: window.innerHeight - (typeof top !== "undefined" ? top.clientHeight : 0),
Request to Rodolfo: can you show me how to get the height with javascript, so if the height of the div changes the we wont have to edit it twice.
For the ads below the image search for:
Code:
<h1 class="viewer-title" data-text="image-description"><?php echo get_image()["description"]; ?></h1>
<div class="header">
To center them give the containing div a class rhen go to style.css and add this
Code:
.class-of-ad-div{
text-align: center;
}
End result:
Last edited: