Site logo

Archived topic

Make banner show up on the blog and single post with sections active.

15 replies · Started by Terrell Jerry on November 4, 2018

Viewing posts 1–15 of 16

Can I use this code?

add_action( ‘generate_before_main_content’,’tu_blog_banner’ );
function tu_blog_banner() {
if ( is_home() || is_single() ) {
?>
<script data-oio-zone="type=banner&zone=1&align=left&refresh=0">
(function(w,d,e,o,u,s,t){w[o]||(w[o]={},s=d.createElement(e),s.src=u,s.async=1,
t=d.getElementsByTagName(e)[0],t.parentNode.insertBefore(s,t))})(window,document,
"script","oiopub","http://www.nthqmockup.com/wp-content/plugins/oiopub-direct/zones.js");
</script>
<?php
}
}

Hi there,

yes, whats the issue?

My banner isn't showing up in the container even on the left side. I want to use sections and also put a 728x90 banner to show up aligned on the left-hand side.

Also, I tried using elements but that isn't working for me.

I look forward to your response.

thanks,

Jerry

For a banner above your content you could use a Hook Element, use the after header hook and just add the code within the <script></script> tags.

This article explains how to add sidebars to Sections, where you can add your ad script using a HTMl widget:

https://docs.generatepress.com/article/allow-sidebars-sections/

I tried that and the banner is still showing outside the left column it not aligned with the left side.

thanks,

Jerry

Sorry having a little trouble understanding, so the banner above the main content, do you want this centered? So there is even space to the left and right?

Try adding the banner inside an element like this:

<div class="grid-container grid-parent">
    Your script in here
</div>

That should center it :)

Tom that corrected it but my sidebar sections aren't showing up. I have them activated can you help me?

I look forward to your response.

thanks,

Jerry

Everything working I like the platform. I having another problem with making another section full width before the footer area. I'm going to provide you with a link to the page look at the advertising section under the navigation its full width in black with advertising text, I want that before the footer widget.

Please provide instructions on the process.

Got to this link http://www.nthqmockup.com/advertise/

I look forward to your response.

thanks,

Jerry

Okay, that worked fine another question is how do I add images, animations, and etc. For that section before footer? So I want the text or animations on top of the banner that's before the footer banner.

I look forward to your response.

thanks,

Jerry

Okay cool, Tom. Thanks for the help great response time! I might have future questions for you, Tom.

This archived topic is closed to new replies.