Special code for header ads in home

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

Status: resolved
Viewing 12 reply threads
  • Author
    Posts
    • #17278

      rfischmann
      Member

      Hi,

      I’m currently running a special 1-week ad campaign on my site and I need a custom code for the ads before header, just in my homepage.

      I managed to do this customizing /newsbeat/inc/template-tags.php, but I wonder if I could do it somehow via custom-functions.php — as I don’t want to mess with core theme files, of course.

      Can you help, Jacob?

      Cheers.

    • #17280

      rfischmann
      Member
      This reply has been marked as private.
    • #17298

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #17303

      rfischmann
      Member

      That isn’t working unfortunately, Jacob.

      I’ve added () next to is_home, which you forgot, but it didn’t make any difference.

    • #17309

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #17312

      rfischmann
      Member

      Still not working for me.

      I even tried a slightly different version of your code: https://d.pr/n/e62OT3

      Didn’t help.

    • #17328

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #17339

      rfischmann
      Member

      It’s indeed working with return 'Your ads here'; only, but when I paste my code there, it stops working. Why?

    • #17340

      rfischmann
      Member
      This reply has been marked as private.
    • #17371

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #17385

      rfischmann
      Member

      Hum, you’re right, it’s working but not as I expected: https://d.pr/i/v9n0XO

      The way I did before, it didn’t have all that blank (light-blue) space around the banner, because my custom code wasn’t placed inside that ad-space DIV.

      There’s no way around that, is it?

    • #17401

      Jacob
      Staff

      Hey there, You must be logged in to view this reply!

      Login | Register | Forgot Password?

    • #17405

      rfischmann
      Member

      That did it. Thanks a lot.

Viewing 12 reply threads
  • You must be logged in to reply to this topic.

This is a PRIVATE forum for verified users only, to view all replies/answers, you must be logged in!

© Copyright 2019 by wpthms.com. All Rights Reserved.