I want to display ads on ad sense from dynamic content, I.E call an API and send in some keywords to get ads, is this possible?
E.G:
Adsense.GetAdsForKeywords("car, subaru, auckland");
Or failing that, have some mark up on the page for words to be used with adsense E.G
<span class="adsense-words">car,subaru,auckland</span>
you can't choose keywords for your ads , Google automatically choose ads for your site based on the text content of your site, as mentioned here Link .
but you can do Section Targeting , to emphasize the content between the section, you can use it as folows
<!-- google_ad_section_start -->
your preferred content goes here, google will emphasize more on this section, you can put your keywords span here
<span class="adsense-words">car,subaru,auckland</span>
<!-- google_ad_section_end -->
reference on section targeting
Related
Hello I need to add some SEO text to one of my Webpage Menu Category.
The problem is that the ''Category'' is not a real category it is and URL Meny Type used for ''offers'' (All the products which includes a discount).
On these page I have no text nor info banner. Just products with discounts.
is there any way I could add at least a box so I can type a well structures SEO text?
Looking forward for you answwer
One way of crudely doing it, (if the page uses the category.tpl file) would be, open the category.tpl file within your theme directory, add a little smarty if statement to check the current category id? or category name, if it matches the desired page, your on.... then show a div with the required SEO text content, obviously not ideal & not dynamic!.. add style code to your css/global.css or css/category.css
to check if the page is using the category files: check the source code body tag!..
ie: body id="category" class="category category-227"
{if $category->id==YOURCATEGORY || $category->name==YOURCATEGORYNAME}
<div id="seoContent">
<p>SEO content!</p>
</div>
{else}
<!-- not required page -->
{/if}
Im trying to add a link to the infobig2.jpg image in my gallery section. I would also like to add another slide once you enter the gallery. My website is www.24kdesignz.com in the infographic section I want the pic to link to http://vs0022.businesscatalyst.com/
<img class="img-responsive project-image" src="assets/images/info.jpg" alt=""><!--Project thumb -->
<div class="hover-mask">
<h2 class="project-title">Infographic</h2><!--Project Title -->
<p>Illustrated | Icon Driven</p><!--Project Subtitle -->
</div>
<!--==== Project Preview HTML ====-->
<div class="sr-only project-description" data-images="assets/images/infobig.jpg,assets/images/infobig2.jpg" >
<p>Infographics – An Infographic is a visual representation of data and information that is presented through a series of design-centric graphics. Its sole purpose is to educate viewers on a topic in a simplistic way – with information that is easy to digest.</p>
</div>
</article><!--End Project Item -->
After inspecting your site it looks like you have a lot of plugins. The portfolio project section from your site's theme is injected using a jQuery library called "Masonry." Inside of your projects assets >> javascript folder there's also a file called "scripts.js" - this is where the theme author injects the images into the portfolio project items.
Solution: Images can't be links. You have to wrap it in an anchor tag. In your specific case, you're going to have to do it using jQuery.
Assuming your HTML markup looks something like this, add a unique id selector to the image you want to become a link:
<li id ="image2">
<img id ="uniqueId" src="/assets/images/infobig2.png">
</li>
Then use jQuery to grab it and wrap it in an anchor tag:
$("#uniqueId").wrap($('<a>', {
href: '/assets/png/' + data.uniqueId
}));
The other solution here would be to just add a link under the image using plain html if you don't feel comfortable editing your theme's jQuery code.
I want to add pages to a blog (in Blogger - https://www.blogger.com/home), but I want a different format and style for each of the pages on the blog.
I tried going to [Blog Name] -> Pages -> New page but the pages that are made uses the template of the main page, including the sidebar and header. Honesty, it looked no different from a blog post.
Can I create a completely blank page and add in all the HTML myself? Or is this not possible with Blogger?
Thanks!!
It is possible, but does require you to go into the editor and do some work.
Blogger uses xml, so you can write conditional tags. So above all of your content you could put the conditional tag, write up all of your HTML and then wrap the whole blog within the else statement.
Within the specific markup you'll need to include the whole tags for the content, like:
<!-- page title -->
<h1><a class='post-link' expr:href='data:i.link'><data:i.title/></a></h1>
<!-- page content -->
<data:i.body/>
otherwise you won't see whatever content you added within the page editor.
<b:if cond='data:blog.url == data:blog.canonicalHomepageUrl + "p/yourpageurl.html"'>
<!-- specific site markup -->
<b:else/>
<!-- All of the normal markup -->
</b:if>
I would like to add a small message above adsense advertisements to signify that it is an advertisement and thank the user for not using adblock. Obviously I would like this to be hidden if the user does use adblock.
I remember doing this a few years ago by simply wrapping the advert using <div class="advert"> and putting the text inside that. It seems that adblock no longer blocks elements in this way as the ad is blocked yet the text remains.
<div class="advert">
Thank you for not using adblock!
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Advertisements directly support the hosting of this site
</div>
I could create a script to detect adblock and hide the text with that but I would rather let the adblock script do the hiding if possible. I am mainly wondering if that is at all possible. Is there somewhere I can include the text so it will be seen as part of the advert and thus be blocked with it?
Well the solution is actually really simple. You just need to apply styles for the text to .adsbygoogle and then use the ::before and ::after pseudo elements to display the text. When the advertisement is blocked the .adsbygoogle element is not present so the pseudo elements aren't created.
.adsbygoogle {
font-size: 12px;
text-align: center;
}
.adsbygoogle:before {
content: 'Text above';
}
.adsbygoogle:after {
content: 'Text below';
}
It is simple, clean and semantic too which is always a plus. No need for extra markup or any javascript.
I'm sorry, but the correct answer to your question is non-technical and negative: you are not allowed to "add a small message above adsense advertisements to signify that it is an advertisement and thank the user for not using adblock".
"Thank you for not using adblock!" anywhere on your site or page:
very big risk, and I think it is a violation of AdSense policies.
"Thank you for not using adblock!" above AdSense unit:
"Unnatural attention" and "Misleading label" in AdSense.
"Advertisements directly support the hosting of this site":
obvious violation - "Encouraging users to click Google ads".
In order to ensure a good experience for users and advertisers,
publishers participating in the AdSense program may not:
Compensate users for viewing ads or performing searches, or promise compensation to a third party for such behavior.
Encourage users to click the Google ads using phrases such as "click the ads", "support us", "visit these links" or other similar
language.
Direct user attention to the ads using arrows or other graphical gimmicks.
Place misleading images alongside individual ads.
Place ads in a floating box script.
Format ads so that they become indistinguishable from other content on that page.
Format site content so that it is difficult to distinguish it from ads.
Place misleading labels above Google ad units. For instance, ads may be labelled "Sponsored Links" or "Advertisements", but not
"Favourite Sites" or "Today's Top Offers".
Source: AdSense program policies
Publishers are not allowed to use language to lead users to click
Google ads, such as:
"Feel free to click an ad"
"Contribute to the cause, visit an ad"
"Help keep this site running, check out our sponsors"
"We need a new server. Support us!"
Source: Ad placement policies
For horizontal ads, wrap your ad with a div
<div class="adHorizontal">
This CSS works for me:
div.adHorizontal ins.adsbygoogle:before {
content: 'Advertisement';
position: relative;
top: 15px;
color: #888;
font-size: .75rem;
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
transform-origin: right top 0;
float:right;}
I want to display comments in my HTML source, but only in the source and not on the actual rendered content of the page. For example, when a user right clicks their browser window and selects "View Source", I want the comments to be visible for them to read there, but I don't want the comments to be visible on the actual rendered website.
I tried
<span style="visibility: hidden;">
Joe Hancock - 04/16/12 - Some comment
</span>
But doing this takes up actual room on the webpage (white space) and really throws off my styling.
Anyone know of an good way to do this?
<!--This is a comment. Comments are not displayed in the browser-->
HTML Comments
Try this:
<!-- Comment goes inside here -->
1<div style="display:none">This is hidden</div>2