How to Display Category Specific Content in Wordpress Wie Display Kategorie Spezifische Inhalte in Wordpress

One thing I love about Wordpress is the great flexibility it offers in terms of designing custom themes and for this all the credit goes to Wordpress Eine Sache, die ich liebe, Wordpress ist die große Flexibilität bietet in der Gestaltung benutzerdefinierte Themen und für diesen die ganze Ehre geht an Wordpress Template Tags Vorlagen-Tags . .

Recently I ran into a problem where I wanted to monetize the posts in my Gadgets category with TTZmedia ads while keeping the normal Google Adsense ads on all other posts. Vor kurzem traf ich ein Problem, wollte ich die Beiträge in meinem Gadgets Kategorie TTZmedia Anzeigen unter Beibehaltung der normalen Google-AdSense-Anzeigen auf allen anderen Stellen Geld verdienen. This is when I found the Dies ist, wenn ich das gefunden in_category in_category template function which lets you display category specific content in Wordpress. Template-Funktion können Sie die Kategorie spezifische Inhalte in Wordpress.

The function is simple and very easy to use. Die Funktion ist einfach und sehr einfach zu bedienen. Just use it in the Loop on any template file and it should work file. Just Use it in the Loop auf einer Template-Datei und es sollte Datei zu arbeiten.

<?php if ( in_category('category_id') ): ?>
// Some category specific PHP/HTML here
<?php endif; ?>

More detailed info and examples can be found on the link below: Nähere Informationen und Beispiele finden Sie auf den unten stehenden Link abgerufen werden:

http://codex.wordpress.org/Template_Tags/in_category http://codex.wordpress.org/Template_Tags/in_category

This can be helpful to monetize posts from certain categories with specific ads and can also be used to display information about a particular category. Das kann hilfreich sein, um Beiträge aus bestimmten Kategorien mit speziellen Anzeigen Geld verdienen und kann auch verwendet werden, um Informationen zu einer bestimmten Kategorie anzuzeigen.

A live implementation of this template function can be seen here on Sizlopedia. Ein Live-Umsetzung dieses Template-Funktion finden Sie hier auf Sizlopedia gesehen werden. If you visit any post that belongs to the Bei einem Besuch in jedem Beitrag gehört, dass die Gadgets Gadgets category you will see targeted product ads while in other cases you will see the normal Google Adsense ads. Kategorie, die Sie werden sehen, gezielte Produkt-Anzeigen während in anderen Fällen sehen Sie die normale Google-AdSense-Anzeigen.

  • Thats a good trick. Thats a good trick. You can also use templates for categories, then you can style or display information specific to that category Sie können auch Vorlagen für die Klassen, dann können Sie Stil oder Informationen speziell für diese Kategorie
  • Thanks a lot its really gonna help me in my search for latest stumbles for my site. Thanks a lot its really mir bei meiner Suche nach neuesten stolpert für meine Website Hilfe gonna.
  • Interesting guide. Interessante führen. Thanks for the detailed guide on how to embed Google Adsense Ads to categories. Vielen Dank für die ausführliche Anleitung, wie die Einbettung von Google AdSense-Anzeigen auf Gruppen. Is there other parts in Wordpress where you can embed Ads? Gibt es andere Teile in Wordpress, wo man embed-Anzeigen?
  • @Rommel @ Rommel

    The best position to embed Google ads is above the content and below the title of article. Die beste Position zum Einbetten von Google-Anzeigen ist über den Inhalt und die unter dem Titel des Artikels. There you get the highest click through rates. Dort erhalten Sie die höchsten Klickraten.
  • Thank you for this information. Vielen Dank für diese Informationen. :) :)
blog comments powered by Disqus Blog-Kommentare powered by Disqus