• Resolved Coleen

    (@coleenh)


    Hi, I’m new to Hueman, and am trying to place ads in the side bar and bottom of my pages. Is there some documentation somewhere on how to do this? I did do a search of WP for info on this and didn’t find anything on how to insert ads into blog posts automatically. Or how to add an “Ad Widget” – can someone please point me in the right direction?

    My website is https://coleenholley.com/category/blog-post/

    Also – as you can see from this link, the post photo is not working. Can anyone tell me how to fix that – or do I need to put that in a separate request? Thanks for any help.

Viewing 15 replies - 1 through 15 (of 22 total)
  • Hi Coleen. Welcome to the Hueman forum. You can place ads in the header and footer using default theme sidebars. You can enable them in Theme Options > Header > Header Ads and Theme Options > Footer > Footer Ads. Then, in Appearance > Widgets, add your ad widget, or a text widget with the ad code, to the Header Ads or Footer Ads sidebar. You can also use either of the default theme sidebars (Primary/Secondary), or the four available Footer Widget Columns. If you want to place ads within the post or page content you can create a new dynamic sidebar, then modify the related post/page theme file in a child theme to display the dynamic sidebar. Takes a bit of php code but not too complicated. There are probably plugins that will accomplish this task without having to modify the theme files.

    Re post images: are your images set as Featured Images on the posts? If not, and you don’t want to set Featured Images, there are plugins available that will use the first image attached to the post as the featured image. I can provide some plugin links if you’re interested.

    Hi bdbrown. I add image in Header Ads, but its shifted to the left. In Footer Ads ok.

    his my test site https://avto-patrol.ru/

    sorry for my english
    thanks

    Both images in the Header Ads and Footer Ads are centered across the width of the site. Is there something else you’re referring to?

    Thread Starter Coleen

    (@coleenh)

    I was able to get the widget for “Ad Inserter” working in the side bar, but am not able to get ads to work for Google Adsense in the footer. I have followed what instructions I could find to do that, but it does not seem to work. Is there a “How to” for that some where? Thanks for your time

    Also, thank you for the information on the post images – I haven’t had a chance to fix that yet, but will let you know if your solution doesn’t work for me – thank you for posting it.

    Thread Starter Coleen

    (@coleenh)

    Thank you bdbrown, sitting the “Featured Image” worked ??

    No I just need to figure out why the Google Adsense in the footer is not working. I will work on that tomorrow and let you know if I can get it to work following your instructions. Thank you.

    Is there a “How to” for that some where?

    Not for the theme specifically. From what I understand you just paste the code into a text widget. I’ve seen many posts where users don’t think it’s working because it doesn’t immediately display the ads. Apparently it takes some amount of time for the ads to sync up with the site.

    Both images in the Header Ads and Footer Ads are centered across the width of the site. Is there something else you’re referring to?

    Header Ads in Firefox looks like this – https://pixvenue.com/showimage/1057108510_3424560_20806397.png
    And on the iPhone and iPad Header Ads is not displayed.

    Header Ads in Firefox looks like this –

    It has something to do with the way FF is handling floats. Try this in your child theme css:

    /* header ads adjustment for FF */
    #header .pad {
        padding-right: 0;
        padding-left: 0;
    }
    #header-ads {
        float: none;
    }
    #header-ads .widget {
        float: left;
        width: 100%;
    }

    And on the iPhone and iPad Header Ads is not displayed.

    The theme automatically hides the header ads in responsive.css to leave room for the site title/logo and description:

    @media only screen and (max-width: 1200px) {
        #header-ads { display: none; }
    }

    You might try this to keep them visible longer; adjust the break points as needed:

    /* display ads on tablets */
    @media only screen and (min-width: 720px) {
        #header-ads { display: block !important; }
    }
    /* hide ads on smaller mobile devices */
    @media only screen and (max-width: 719px) {
        #header-ads { display: none; }
    }

    It has something to do with the way FF is handling floats. Try this in your child theme css:

    You might try this to keep them visible longer; adjust the break points as needed:

    Its really works, thanks. bdbrown, you are the best.

    You’re welcome. If you don’t need any further assistance here please mark the topic as Resolved. Thanks.

    bdbrown, sorry, but I not topic starter

    So I see ?? Probably should have been a separate topic. OK, we’ll wait to see what the OP has to say.

    Thread Starter Coleen

    (@coleenh)

    I was able to place the Adsense code snippet in the bottom of the page, but not the footer. I did go to Appearance> Themes> Theme Options> Footer, but there is no place to paste the adsense code. Plus, I dont’ really want it IN the footer (where the copyright info is) I want it at the bottom fo the page, on every page and post – directly above where the recent posts section is. Is there a way to do that, other than actually placing the code on every page manually? I’m sure I’m missing something simple…

    Thanks for your help.

    Hi Coleen. Sorry about the thread being hi-jacked; my fault. Sure, you can accomplish that with a child theme and a little coding. Creating a child theme with Hueman is pretty easy:
    1. In Theme Options click the Help tab in the upper righthand corner.
    2. One of the options in the list is “Download the sample child theme”. This downloads the theme zip file to your local computer.
    3. Install the new theme in your Admin panel by selecting Add New > Upload Theme > Choose File, then select the zip file you downloaded.
    4. Activate the child theme.
    You’ll now have a pre-configured child theme with a style.css file and functions.php file to which you can add customizations.

    To insert your ads:

    1. Appearance > Theme Options > Sidebars, create a new dynamic sidebar with a unique Sidebar ID; something like “my-ad-sidebar”.

    2. Appearance > Widgets, add a text widget to the new sidebar and place your ad content in the widget.

    3. Copy footer.php from the parent theme to your child theme. The ad won’t be in the footer but the footer.php file contains the closing tags for the section above it.

    4. At the top of the footer.php file you’ll see this:

    .
    			</div><!--/.main-inner-->
    		</div><!--/.main-->
    	</div><!--/.container-inner-->
    </div><!--/.container-->

    5. Add the code for the sidebar:

    .
    			</div><!--/.main-inner-->
    		</div><!--/.main-->
    	</div><!--/.container-inner-->
    
            <?php
                echo '<div class="my-ad-widget">';   // add a container
                dynamic_sidebar('my-ad-sidebar');    // insert the sidebar
                echo '</div>';
            ?>
    
    </div><!--/.container-->

    6. Add the following to your child theme css:

    .my-ad-widget {
        text-align: center;
    }

    Let me know if you have any questions.

    Thread Starter Coleen

    (@coleenh)

    Thank you bdbrown, I appreciate all of your help. And I don’t mind the hi-jacking, although his issue wasn’t exactly the same as mine, if he got the assistance he needed then it’s all good. ??

    I do have a question before I add i the code you gave me. I DID download and install the child theme – thank you! However, I’m not really sure if the code will do what I want. I don’t want the add to be in the footer of the sidebar, I want it directly above the Footer section of the entire theme; i.e., Footer Options Screen Shot as you can see in this screen shot of the Theme options > Footer > Footer Ads I’d like the bottom footer to be one long, solid banner ad. Will the code you gave me do that?

    Thanks again for all of your assistance, it is greatly appreciated.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘How to insert ads in the sidebar’ is closed to new replies.