• In an effort to fix the header ads not showing up issue, I have some finding and want to share with everyone and get a working input here:

    I did this on my local wamp site, so I am sorry it is no use to post my site here, but the Ad’s image is a working image, so you can test with copy and paste.

    Appearance->Theme Options->Advertising:

    I put same image into the header and middle ad:

    <img src=”https://www.anjiatoronto.com/web/wp-content/uploads/2015/04/WDSTLogoNew.png&#8221; alt=”Web Design” title=”Web Design” />

    The middle one shows up but not the header one, reviewing the page’s source code and tested it, the issue is with the header’s style: <div class=”header-ads f-right”>

    in style.css it is: .header-ads.f-right

    Note there is one “.” difference, so basically header ad is not showing up because the style class cannot be found.

    How the theme is applying different class to different element?

    Can anyone help? thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter mdivk

    (@mdivk)

    I have found the fix, in header.php, look for:
    <div class=”header-ads f-right”>

    add a “.” to make it:

    <div class=”header-ads.f-right”>

    Presumably it should work now.

    Thread Starter mdivk

    (@mdivk)

    Hmmm, I believe there are more bugs in this great theme.

    Here is my site that is using this theme:

    https://kidscalpacupuncturemassage.com/

    I have put the following images in the header ads section:

    and I modified the header.php

    The image is in the source code of the page but doesn’t get displayed.

    Besides, please use Chrome and you will see there are three errors although the page is generated:

    Element does not exist in DOM!
    https://kidscalpacupuncturemassage.com/wp-content/themes/profitmag/css/images/bx_loader.gif Failed to load resource: the server responded with a status of 404 (Not Found)
    chrome-extension://ihmgiclibbndffejedjimfjmfoabpcke/src/lib/prevel.js:737 Uncaught SecurityError: Failed to execute ‘addEventListener’ on ‘EventTarget’: Blocked a frame with origin “https://kidscalpacupuncturemassage.com&#8221; from accessing a frame with origin “https://www.google.com&#8221;. The frame requesting access has a protocol of “http”, the frame being accessed has a protocol of “https”. Protocols must match.

    kidscalpacupuncturemassage.com/:69 Uncaught SecurityError: Failed to read the ‘contentDocument’ property from ‘HTMLIFrameElement’: Blocked a frame with origin “https://kidscalpacupuncturemassage.com&#8221; from accessing a frame with origin “https://www.google.com&#8221;. The frame requesting access has a protocol of “http”, the frame being accessed has a protocol of “https”. Protocols must match.

    I seem to have the same problem with the front page’s “mid-section-ads”.
    The front-page.php <div> reads:

    <div class="mid-section-ads">
                                <?php echo $profitmag_settings['mid_section_ads']; ?>
                            </div>

    and

    <?php else: ?>
                <div class="mid-section-ads">
                    <a href="#" ><img src="<?php echo get_template_directory_uri().'/images/demo/analog-camera-photography-rolleicord-3832.jpg' ?>"/></a>
                </div>
        <?php endif; ?>

    while the stylesheet reads:

    .mid-section-ads img{
    	width: 100%;
    }

    I fail to see any discrepancies, and yet the (correctly formatted) image fails to show up.

    Also I seem to have the same problem with the header ad, even when header.php and stylesheet are formatted according to above suggestions.

    Any idea is most welcome (as the site launches in hours).

    Cheers,
    Jarle

    Problem solved!

    Turned out the entry box in theme options hade to be dragged wider, in order to prevent code from breaking in two lines.

    My bad.

    Thanks a lot all the same — and a very good weekend to all!

    Greetings from Jarle

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to fix the style sheet issue on Header Ads’ is closed to new replies.