Display ads in categories

Community Forums Forums General Discussion Display ads in categories

This topic is: resolved


This topic contains 7 replies, has 3 voices, and was last updated by  rammen 2 years, 4 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #48350



    I want to display specific ads in specific categorie-pages. Let’s say a viewer click on “technology” and it shows all the articles related to technology. I then want to display a ad after, lets say three expert articles, that is related to technology. How can i do that? Do i need to add something in functions.php?

    I use genesis featured widget amplified to solve this in my main page, but how can i do it in categorie-pages?

    Im thankful for any help i can get.



    Hook in a custom widget area using the conditional tag for a category:

     if (is_category(‘technology’) ) {

    Change the hook position if needed.



    Thanks! That worked. But I still don’t get ads to only appear after post #3. When i use genesis_after_post the ads display after all posts.. I only want it to display after posts #3.

    Do i need to add something in this line: if (is_category(‘technology’) && is_active_sidebar( ‘custom-widget’ ) ) { ?



    The way I got something similar to work was to have 2 instances of Genesis Featured Posts Amplified, using the offset.

    So in the sidebar that Brad’s code created, you’d have something like this:

    Genesis Featured Posts Amplified widget (showing only 3 posts)
    Text Widget (containing the code for your ad)
    Genesis Featured Posts Amplified widget (same config as first GFWA, but offset by 3 posts)

    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark



    You can do this and i have answered a question similar to yours before about how to do this which involves adding a variable to the code. Just can’t find it at the moment.



    Summer: I use that method at the front page. But my problem in categories-page is that it automatically show the last 6 posts in that category, and then the amplified widget on top of that. I know how i can adjust how many post there is in categories, but how can i remove it, and let genesis featured post amplified do all the work?

    I also wondering about how i change the widget text. If i am going to use this method, i need different names for all the categories. Now it is “Custom Widget”.

    Braddalton: If you find the variable, please let me know. It makes is so much easier.

    Again, thanks for all the help!



    You can tag the posts you want to display ads on and then use the conditional,

     if ( has_tag (‘your_tag’)  ) { 



    Works like a charm! Thanks for your help.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.