Support » Fixing WordPress » split up the content of posts for ad?

  • I have a client who wants to split up his articles to feature an ad inbetween at a certain point. is there a way to do this with “the_content” ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Michael


    Forum Moderator

    …wants to split up his articles to feature an ad inbetween at a certain point.

    what is a ‘certain point’ in programming terms?

    to put the ad into single post at the position of the more-tag (if it does not collide with the shortform of the post in archives or on the home page), you could try and follow this article:
    (adaptable to non-adsense ads)

    create a shortcode to place the ad; does not have to be as complicated as this:
    (adaptable to non-adsense ads)

    build a filter function for ‘the_content’ to insert the ads after a certain number of paragraphs or words.

    search the

    What if this is not an ad. What if I want to split up the content and put a bar in between the top portion and bottom portion of the content with News, links, videos, etc.?

    Horizontal Bar (at 100%) with important info.
    rest of the content.

    Is this possible with pages and posts?

    Yeah, the concept is the same. It’s about breaking up the content, what you insert after doing that is inconsequential

    Can you give me more detail? I am fairly new and the above links are complicated for me.



    Forum Moderator

    Can you give me more detail?

    for more detail, we need more details first:
    can you post the name of your theme and a link to your site, and more information what you like to insert where into the content of posts and pages?

    is it always a fixed extra content, or depending on something ?

    using a filter function for ‘the_content’ seem to be one possible way to go; either in the ‘read-more’ position or after a set amount of paragraphs or words;
    alternatively you could try and use a shortcode so the user has control if and where the content will show.

    The site is
    Our dreamhost server went down the other day so it is really slow right now and may not come up. Hopefully you can see it. I have just begun designing the theme. There is no conent

    The red bar across the bottom is supposed to hold miscellaneous widgets and eventually will be cutting the middle of the content.

    I read the codex page on “the_content” but think it may be above my level of understanding. Maybe you can explain how to do the shortcode?

    The top portion of content is always the same height so maybe I can guess on the number of paragraphs, but then it will be messed up if they put in a video or image. So maybe the short code is the best answer?



    Forum Moderator

    ‘shortcode’ is out of the discussion, it is not drastic enough to match your design idea.

    this question is a near duplicate to:

    I suggest to focus on that one.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘split up the content of posts for ad?’ is closed to new replies.