Forum Replies Created

Viewing 16 replies (of 16 total)
  • Thread Starter flow01

    (@flow01)

    Thank you for your quick responsed guys!

    @alchymyth
    I’d like to insert my AD automatically without editing older and future posts. Just like AdSense WP plug-ins do. They insert ads in the middle of the post for instanse.

    @tymayn
    I’m sorry, I’m bad at English so most likely I explained it wrongly though this would be useful for me too! 🙂 Once again…

    This is my single.php file (it shows a single post):
    <h1><?php the_title(); ?></h1><small>on <?php the_time(‘M d’); ?> in <?php the_category(‘, ‘); ?> by <?php the_author_posts_link(); ?></small>

    and so on… and finally:

    <div id=”the_post”><?php the_content(); ?></div>

    I want to split the_content(); into two:
    1. Content before <!–more–>
    2. I want to put an AD exactly there where <!–more–> is.
    3. I want to display content after <!–more–>

    Normally I would do something like:

    <div id=”the_post”><?php the_content( show only excerpt ); ?>
    <div>AD here</div>
    <?php the_content( show only the rest of the post ); ?>
    </div>

    but there is no such option I guess :P. Plugins like that insert ads uses str_replace() and some complicated loops. It’s too hard for me.

Viewing 16 replies (of 16 total)