WordPress.org

Ready to get started?Download WordPress

Forums

split up the content of posts for ad? (8 posts)

  1. Mr. Bigsby
    Member
    Posted 3 years ago #

    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" ?

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

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

    what is a 'certain point' in programming terms?

    a:
    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:
    http://www.transformationpowertools.com/wordpress/adsense-ad-at-more-tag-fold
    (adaptable to non-adsense ads)

    b:
    create a shortcode to place the ad; does not have to be as complicated as this:
    http://www.transformationpowertools.com/wordpress/adsense-in-posts-and-pages-for-wp3
    (adaptable to non-adsense ads)

    c:
    build a filter function for 'the_content' to insert the ads after a certain number of paragraphs or words.
    http://codex.wordpress.org/Plugin_API

    d:
    search the http://wordpress.org/extend/plugins/search.php?q=advertising&sort=

  3. Wish Web Geek
    Member
    Posted 2 years ago #

    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.?

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

    Is this possible with pages and posts?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

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

  5. Wish Web Geek
    Member
    Posted 2 years ago #

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

  6. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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.

  7. Wish Web Geek
    Member
    Posted 2 years ago #

    The site is http://flagstaffit.com/azra
    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?

  8. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

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

    this question is a near duplicate to: http://wordpress.org/support/topic/need-help-on-how-to-design-a-site-with-a-static-bar-through-middle-of-content?replies=4

    I suggest to focus on that one.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.