0 741 0
How is an image displayed in Google News? News image display code

How to add the official code of how to show the news of your sites that are accepted to Google news. Subscribe to google news to your site and add an image display code to solve all your problems.

 

Add the code below to the CSS file in an appropriate place. Add the CSS code to one of the fields in the theme panel, such as Additional CSS – Custom CSS. If neither of them is available, add it to your theme’s style.css file.

/* google news butonu */
.google-news{display:inline-block;vertical-align:top}
.google-news a{display:block;color:#fff;width:94px;height:34px;border:1px solid #e3e3e3;border-radius:3px;background:url([url]https://ilgintv.com/medya/g-news.svg[/url]) no-repeat center center;background-size:100%}.soft-post-article{height:auto;overflow:hidden}

After adding the code given above, add the below code to the GOOGLE NEWS SUBSCRIBE button where you want it to appear on your site.

If you say I cannot deal with these codes, let me give you another alternative directly in the form of html:

[infobox color=”#000000″]<a href=”https://news.google.com/publications/CAAqBwgKMPy2lAswy_ypAw?hl=tr&amp;gl=TR&amp;ceid=TR%3Atr” target=”_blank” rel=”nofollow noopener noreferrer”><img class=”alignleft wp-image-2389 ” src=”https://ilgintv.com/wp-content/uploads/2020/05/googlenews123.png” alt=”” width=”204” height=”37” /></a>[/infobox]Google news abone ol banner kullanmaya başlayabilirsiniz.

Subscribe to Google news and start using banner.

Show an image to the news posted on Google News

In order to show the pictures besides the content published by the sites accepted to Google news, it is enough to add the following code to a suitable place in the function file. In some themes, it is enough to add the additional function file.

function thumbnail_in_rssfeed($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = ” . get_the_post_thumbnail($post->ID) . ” . $content;
}
return $content;
}
add_filter(‘the_excerpt_rss’, ‘thumbnail_in_rssfeed’);
add_filter(‘the_content_feed’, ‘thumbnail_in_rssfeed’);

Tags

Eid al-Adha message and words! Sacrifice prayer, how is the sacrifice sacrificed, who cuts it, how is it distributed? During the sacrificial slaughter, people can both harm themselves and…
by imleme
0 904 0
10 breathtaking must-see places in the world Here are 10 of the most beautiful places in the…
by imleme
0 676 0
Access all your Steam games from the palm of your hand Steam Deck is Valve's Answer to Nintendo Switch. Valve, the gaming…
by imleme
0 254 0
Your nameYour emailYour text

Leave a Reply

Log in
Register
Send message