• Resolved gary1579

    (@gary1579)


    Hello,

    I am trying to remove a “read more” command, that seems to be inserted into the index.php. The “Read More” is showing up in my articles, even though I do not want them there. I have checked the boards, and see lots of people seem to have the same issue, but each solution is theme-specific.

    I don’t know the language, as I am not really computer code literate. However, I do see where the line says “Read More” near the middle of the code.

    I guess this is where the code needs some editing.

    I have attached the full index.php code below, hoping that someone has an answer to this.

    Anyway, if anyone has a solution to this, I would be very grateful.

    btw: the theme is WP-Portal Theme 2.1

    Thanks,

    Gary

    <?php
    get_header();

    if (have_posts()) : $first = true;
    while (have_posts()) : the_post();
    $arc_year = get_the_time(‘Y’);
    $arc_month = get_the_time(‘m’);
    $arc_day = get_the_time(‘d’);
    ?>
    <!– begin post –>
    <div class=”post<?php if ($first) { echo ‘ first’; $first = false; } ?>”>
    <h2>“><?php the_title(); ?></h2>
    <p class=”date”><?php the_time(‘jS F, Y’) ?> – Posted by <?php the_author(); ?> – <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></p>
    <p><?php ob_start(); the_excerpt(); echo dp_clean_excerpt(ob_get_clean()); ?> “>Read More</p>
    </div>
    <!– end post –>
    <?php endwhile; ?>
    <p id=”postnav”>
    <?php next_posts_link(‘Older Entries’); ?>  
    <?php previous_posts_link(‘Newer Entries’); ?>
    </p>
    <?php else : ?>
    <div class=”notfound”>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that is not here.</p>
    </div>
    <?php endif; ?>
    <?php

    get_sidebar();
    get_footer();
    ?>

Viewing 10 replies - 1 through 10 (of 10 total)
  • remove <a href="">Read More</a> from your file.

    Thread Starter gary1579

    (@gary1579)

    Thanks for the reply chinmoy29.

    That didn’t quite work. I removed only this text, but it still didn’t work.

    Instead of saying “read more”, it replaced that text with my url, but still with the same result (ie. the article still only showed the first few lines, but this time, no link to view the full article).

    I have been able to revert it back, so the same problem exists.

    Thanks anyway for your consideration to this matter.

    Moderator t-p

    (@t-p)

    If you do not want it on any posts,
    then edit theme’s single.php and remove the read more code

    it is not clear what you want:

    – remove the ‘read more’ link?

    – or show the full article (and remove the ‘read more’ link)?

    if you want the second, try to replace this line:

    <p><?php ob_start(); the_excerpt(); echo dp_clean_excerpt(ob_get_clean()); ?> ">Read More</p>

    (it will look slightly different because you did not use the ‘code’ button while posting your code)

    with this line, for instance:

    <?php the_content(); ?>

    Thread Starter gary1579

    (@gary1579)

    Thanks t-p,

    I have looked at the coding for single.php, which I have cut and pasted below.

    It doesn’t have any “read more” code in this, as far as I can see.

    If you have any ideas, I would be happy to hear them. If not, then probably my best solution is to move onto another theme.

    Thanks,

    Gary

    <?php
    get_header();

    if (have_posts()) : the_post();
    $arc_year = get_the_time(‘Y’);
    $arc_month = get_the_time(‘m’);
    $arc_day = get_the_time(‘d’);
    ?>
    <!– begin post –>
    <div class=”post first”>
    <h2>“><?php the_title(); ?></h2>
    <p class=”date”><?php the_time(‘jS F, Y’) ?> – Posted by <?php the_author(); ?> – <?php comments_popup_link(‘No Comments’, ‘1 Comment’, ‘% Comments’); ?></p>
    <?php the_content(); ?>
    <div id=”postdetails”>
    <?php the_tags( ‘<p>Tags: ‘, ‘, ‘, ‘</p>’); ?>
    <p>Posted on: “><?php the_time(‘F j, Y’) ?></p>
    <p>Filed under: <?php the_category(‘, ‘) ?></p>
    </div>
    <?php comments_template(); ?>
    </div>
    <!– end post –>
    <?php else : ?>
    <div class=”notfound”>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that is not here.</p>
    </div>
    <?php endif; ?>
    <?php

    get_sidebar();
    get_footer();
    ?>

    Moderator t-p

    (@t-p)

    have you tried alchymyth’s suggestion?

    Moderator t-p

    (@t-p)

    also check page.php and index.php of your theme

    Thread Starter gary1579

    (@gary1579)

    Thanks t-p, I did not see that post.

    alchymyth, you are correct, it was the 2nd option I was seeking. I tried it, and it worked! The post now shows the entire article!

    Thanks so much alchymyth, and everyone for your contributions in helping me solve my problem!!

    Gary

    Moderator t-p

    (@t-p)

    glad you sorted it out.

    please mark this thread “resolved” using the dropdown in the right panel.

    Hi I have the same problem I don’t want the readmore button that cuts off the blog I want to read the entire blog. Here is the code that I saw read more. I don’t want to break the website. Here is the code bellow in index.php of themes folder. I’m using headlines theme provided from woothemes.

    <div class=”entry”>

    <?php if ( get_option(‘woo_home_content’) == “true” ) { ?>
    <?php the_content(__(‘Read more…’, ‘woothemes’)); ?>
    <?php } else { ?>
    <?php the_excerpt(); ?><span class=”read-more”>” title=”<?php the_title(); ?>” class=”btn”><?php _e(‘Read more’, ‘woothemes’); ?></span>
    <?php } ?>

    IT would be appreciated if anybody can help me on this.

    Thanks,
    Seema

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Remove "read more"’ is closed to new replies.