• Resolved havingfun

    (@havingfun)


    I have been able to place ads on pages/posts/archives. However, how can I place an ad directly below the “Latest Articles” column where there is a lot of dead space in the homepage?

    youandthekids.com

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi, if that’s the sidebar then you can try installing a php/html widget and use it in the sidebar(guess this is the most easy and fast solution).
    Regards

    Thread Starter havingfun

    (@havingfun)

    @jnhghy…unfortunately it is not the sidebar. I actually have installed a widget but the sidebar appears everywhere within my site EXCEPT the homepage. That is why I have only one ad on the homepage where I have more throughout the site. I know I more than likely need to place a code somewhere within css but don’t know what the code would be (outside of the ad code) and where exactly I would need to place it. Would you or anyone else know?

    Thx in advance…

    youandthekids.com

    The theme that you are using seems to be custom made by https://www.iwebix.de/ , it’s not a theme that all of us have access to so it will be very hard to find somebody that had experiences with this, what I can suggest is to check if in the php files you have something like: home.php or default.php (you can also check index.php) to see if any of these files contain the page generating code if you find it, you can use a pastebin and then it is a little bit easier to get help on that pastebin text.
    Regards

    in index.php;

    add whatever you need after this section (about 5 lines from the end of the file):

    <?php endwhile;?>
                    </ul>
    Thread Starter havingfun

    (@havingfun)

    @alchymyth…thanks for your reponse, however it placed the ad righ on top of the “Latest Articles” list rather than directly below the list. I tried placing the code in a few other places within index.php but close to the area you recommend but also did not work. Any other suggestions?

    youandthekids.com

    the problem is caused by your usage of position:absolute; on the .latest-posts;

    try to pull the ad code to before the </ul>;

    and possibly wrap the ad code into a span or div for more formatting options.

    alternatively:
    wrap the featured posts into a div; and remove the absolute positioning from .latest-posts;

    in index.php, add the opening div here:

    <div id="column-top">
            </div>
    
            <div id="column-content">
    
    		<div class="feature-wrapper"><!-- wrapper div for featured posts -->
    
    		<?php
    
    		global $post;

    and close it here:

    <?php endforeach; ?>
    		</div><!-- .feature-wrapper -->
    
            <div class="latest-posts">
                    <h2>Latest Articles</h2>

    and style it with:

    .feature-wrapper {
    float: left;
    width: 663px;
    }

    I would still suggest that you wrap the ad code into a div for formatting reasons.

    Thread Starter havingfun

    (@havingfun)

    @alchymyth…sorry to ask this but how do you “wrap the ad code into a div” since you ultimately suggest it for formatting reasons? Unfortunately, I am not a coder and am not familiar with it but can try with direction.

    example:

    <div class="ads">
    ADSENSE CODE
    </div>

    which you could style with:

    .ads { ... }

    Thread Starter havingfun

    (@havingfun)

    @alchymyth…thank you so much for your help and your patience!

    Thread Starter havingfun

    (@havingfun)

    @alchymyth…actually one more thing. Can you help me with the code and where to place it on how to seperate the two ads I had placed on the home page below recent articles? I would like to place a little space in between the two ads and move the top ad a little lower from the recent articles list too. Right now the two ads are stuck to eachother and the top ad seems to close to the list of recent articles.

    youandthekids.com

    place a little space in between the two ads and move the top ad a little lower from the recent articles list

    that is where the ‘wrapping in a div’ comes in;

    you could do this directly in the divs with inline styles;
    example:

    <div style="margin-top:20px;">
    ADSENSE CODE 1
    </div>
    <div style="margin-top:20px;">
    ADSENSE CODE 2
    </div>

    https://www.w3schools.com/css/css_margin.asp

    Thread Starter havingfun

    (@havingfun)

    @alchymyth…well done! perfect! and thx for the css link too. It is definately something I will have to try to learn myself (but I must say is very intimidating).

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘how do you place an ad at a specific location on the homepage?’ is closed to new replies.