• Resolved cookingwithlei

    (@cookingwithlei)


    Hi, Ben:

    I tried to put some ads banner on the posts, but found it is impossible to be on the right hand side because of the formatting of the theme.

    Is it possible to move the menu to the right hand side then ads banner underneath? or just ads banner on the right hand side?

    Thanks,

    Lei

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Ben Sibley

    (@bensibley)

    I’m afraid that’s not possible without rewriting much of the template code. One thing you could do is instead is add the ads as widgets in the “sidebar” below the menu. Then you could keep it open at all times with the following CSS:

    .sidebar-primary-content {
      max-height: none !important;
    }
    .sidebar-primary {
      border-bottom: solid 1px #d4d4d4;
    }

    Alternatively, you could put the ad code anywhere on the page, and then fix the ads to the right side of the screen. They would be stationary while people scroll up and down the page.

    If you were to put the ads in a div with a class “advertisement-container”, here is an example of the CSS you could use:

    @media all and (min-width: 800px) {
      
      .advertisement-container {
        position: fixed;
        right: 24px;
        top: 144px;
      }
    }
    Thread Starter cookingwithlei

    (@cookingwithlei)

    Wonderful, Ben. The “advertisement-container” works very well. Is it possible to set the same ads for all posts?

    Lei

    Theme Author Ben Sibley

    (@bensibley)

    Yea the cool thing about the fixed position code is that you can place the ad code anywhere on the page. This gives us quite a few options, but I think the best way is to use the content.php file.

    If you copy the content.php from Founder into your child theme, you can put the ad code anywhere in that file. I think it would make the most sense at the bottom of the “article” element, but it’s not too important. That ad code will then be included on all of the posts.

    Thread Starter cookingwithlei

    (@cookingwithlei)

    Brilliant! Thanks, Ban.

    Theme Author Ben Sibley

    (@bensibley)

    You’re welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Ads position’ is closed to new replies.