WordPress.org

Ready to get started?Download WordPress

Forums

How to make content with Google Ads inbetween? (5 posts)

  1. davehprohoods
    Member
    Posted 1 year ago #

    We want to have multiple pages of content that have Google Ads scattered inbetween, but I'm not sure the easiest way to do this. I think the two ways would be to create multiple posts for each section and then make a template that grabs those posts and has the Google Ads in the HTML, and the other way would be to create a page with Google Ads in the source code, but I'm afraid that our content writers/editors could screw up the source code and cause us problems with the Google Ads.

    Can someone recommend the best advice here?

  2. catacaustic
    Member
    Posted 1 year ago #

    Definatley the template. Don't let the writers/authors have any access to that. They'll either place their own ads in or just break yours (been there, done that, and seen just what happens).

    You should be able to add some relatively simple PHP code into the loop of the category/archive template that outputs an add every X posts. That's definiately the easiest way to do it.

  3. davehprohoods
    Member
    Posted 1 year ago #

    Actually what I would rather do is just have the template with our Ads in it then call whatever posts we want wherever we want. I was looking in the Codex on how to make the calls but it got confusing and appeared to require the "Post ID" which I could not find specified in the WordPress admin Posts section or while editing the post.

    Can someone please advise on how to call posts into the page?

  4. catacaustic
    Member
    Posted 1 year ago #

    Now you're confusing me with what you're trying to do, but that's not a big deal. Everyone does things different ways.

    To get the psot ID is pretty easy, although it's not shown on the admin area. When you're looking at the post/page/whiatever list, hover your mouse over the link to 'Edit' and you'll see the link pointing to something like:

    http://mysite.com/wp-admin/post.php?post=2&action=edit

    That is where you'll find the post ID. In that example, you'll see the post ID is 2.

  5. davehprohoods
    Member
    Posted 1 year ago #

    Well, I tried to create another thread asking how to do this a different way, but it was closed as a duplicate.

    So, I tried WP-Insert, but it only puts one ad in the middle, not multiple. I don't know how to put ads in-between page or post content without putting it in the text editor, so can someone please advise me how to do this?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.