[Resolved] Question on Hook Up Addon

Home Forums Support [Resolved] Question on Hook Up Addon

Home Forums Support Question on Hook Up Addon

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #98675
    marvin

    I have an advertisment script, used hook up and want it to appear only on posts and not on pages. how will I do that?

    #98728
    Tom
    Lead Developer
    Lead Developer

    You can put it inside an if conditional.

    For example:

    <?php if ( is_single() ) : ?>
          Anything I put in here will only show up on posts.
    <?php endif; ?>

    Then be sure to check the “Execute PHP” checkbox.

    Let me know if you need more info πŸ™‚

    #98922
    marvin

    Hi Tom,

    the code worked well. thanks! πŸ™‚

    also, I do have additional questions

    i also want to show the ads in my home page which is supposed to be shown in the excerpts of my 10 latest post. but how can I make the ads to show only in the top 2 latest post? my ads is adsense and if there are more than 3 ads, the remaining excerpts will show only a huge blank space and it does not look appealing if it stays like that. hope you can help me on this one as well

    thanks in advance

    #99098
    Tom
    Lead Developer
    Lead Developer

    That’s a tough one – the code for that would be very complicated.

    I’m not 100% sure this plugin has that option, but it’s worth a look: https://wordpress.org/plugins/ad-inserter/

    #99301
    marvin

    Hi Tom,

    I tried to used the plugin and yes it can do what I want. πŸ™‚

    Thanks!

    #99314
    Tom
    Lead Developer
    Lead Developer

    Perfect πŸ™‚

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.