WordPress.org

Ready to get started?Download WordPress

Forums

how to use the_excerpt() reloaded plugin in K2 (9 posts)

  1. madmax019hotmailde
    Member
    Posted 6 years ago #

    i am not a genius in following these instructions by guff:

    "To install and use the_excerpt Reloaded, download the zip file, extract the-excerpt-reloaded.php, upload this to your wp-content/plugins/ directory, and activate the plugin in WordPress. The function the_excerpt_reloaded() must be used in The Loop."

    the function is this i guess:

    "<?php the_excerpt_reloaded(1000, '<img><div>', 'none', TRUE, '[Read On...]', TRUE); ?>"

    where do i place this function? please give me the exact position and dont just say i should place in the loop file or so!

    thanks,

    max

  2. BPartch
    Member
    Posted 6 years ago #

    Hello

    That function goes in the loop ;) Na just kidding. :)

    Though that is where it goes. The file it goes in depends on where you want to use the excerpt reloaded.

    Lets say you want it to be used on the archive pages for example purposes. You would open archive.php from your current themes folder. Then you would look in it until you find the line:

    <?php the_content(); ?>

    Then you would replace this line with the excerpt reloaded function, assuming you want the excerpt to appear instead of the actual content.

    Hope it helps.

    If you still have questions just post again. :)

  3. madmax019hotmailde
    Member
    Posted 6 years ago #

    the actual thing that i want is that the ads (google) are only displayed if you have opened the post. so the ads should not appear on the searches, archives, categorries or on the main page. only if you have the page selected or opened.

    i though i can use the excerpt reloaded to make sure that the scripts are not shown - but everything else.

    your helpl was great but it does not really solves it.

    so in the loop file i have found this:

    <div class="entry-content">

    <?php the_content(sprintf(__("Continue reading '%s'", 'k2_domain'), the_title('', '', false))); ?>

    do i change that part into this:

    <div class="entry-content">

    <?php the_excerpt_reloaded(1000, '<img><div>', 'none', TRUE, '[Read On...]', TRUE); ?>

    the probem is, if i do that it only shows the excerpt. also when i have clicked on the post! there is no way anymore to view the whole content!

    what am i doing wrong? i just dont want the ads to not appear on the archives, searches and main post page!

    thanks,

    max

  4. BPartch
    Member
    Posted 6 years ago #

    Hello

    Okay, I do not think you need this plug in to do what you are after.

    You just need to place the Google code into the single.php file. single.php is used when displaying a single article.

    Where you want the ad to appear determines where it goes in the single.php file.

    If you have more questions ask again. :)

    Hope it helps. :)

  5. madmax019hotmailde
    Member
    Posted 6 years ago #

    im sorry i am keeping you on there - but i should have mentioned that i use the adsense deluxe plugin. that means the ads are right in the post!

    that would make a difference, wouldnt it?

    max

  6. BPartch
    Member
    Posted 6 years ago #

    Hello

    It should not, though I have never used this plug in, so I may be wrong if it does something I am unaware of.

    You need to add it inside the loop in single.php. You may need to surround it with a division and give that a class and add some styles to position it as desired.

    Example:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="google">
    google ad code here...
    </div>
    <?php the_content(); ?>
    <?php endwhile; else: ?>

    Hope it helps, if not post again we will get it sorted at some point. :)

  7. madmax019hotmailde
    Member
    Posted 6 years ago #

    hm - it might help if i provide my site:

    http://mac.karreth.com

    i have ads in the posts and ads in the sidebar. google only allows 3 ads to be placed. but the more posts i have - the more ads there will be. yet only 3 will appear on the blog page. the thing i want is that on the front page - only the sidebar ad will appear.

    the ads in the posts only on the post or the page!

    max

  8. madmax019hotmailde
    Member
    Posted 6 years ago #

    it seems to be the problem with k2!!!

    i have done it before with the kubrick theme - but here it does not seem to work!

    any more ideas?

  9. madmax019hotmailde
    Member
    Posted 6 years ago #

    BPartch - thank you so much! i actually got it work now as i wanted to! thanks - youve been a great help!

    :-)

    max

Topic Closed

This topic has been closed to new replies.

About this Topic