• araujolr26

    (@araujolr26)


    I am trying to remove the Read More link at the end of my post. I would like to display the entire post. I have been looking at the forum for an answer to this but have been unsuccessful. I have tried changing ‘the_excerpt’ to ‘the_content’ in my index.php but it’s still showing on my main page. Here is the section of code:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    <h2 style="background-repeat: no-repeat;">Recent News</h2>
                    <?php
                    global $post;
                    $args = array('numberposts' => 2, 'offset' => 0, 'category' => get_cat_ID('News'), 'orderby' => 'post_date', 'order' => 'DESC');
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post);
    						$externalUrl = get_post_meta();
                    ?>
                          	<?php
                            if ($externalUrl != NULL && $externalUrl != '' && strlen($externalUrl) > 0) { ?>
                                <h3><a>"><?php the_title(); ?></a></h3>
                            <?php } else { ?>
                                <h3><a>"><?php the_title(); ?></a></h3>
                            <?php } ?>
                            <h4><?php the_date(); ?></h4>
                            <p><?php the_content(",FALSE,"); ?></p>
                            <?php
                            if ($externalUrl != NULL && $externalUrl != '' && strlen($externalUrl) > 0) { ?>
                                <h5 class="whiteShadow"><a>">MORE</a></h5>
                            <?php } else { ?>
                                <h5 class="whiteShadow"><a>">MORE</a></h5>
                            <?php } ?>
    
                    <?php endforeach; ?>
                </div>

    Thank you in advance for the help!

Viewing 1 replies (of 1 total)
  • Thread Starter araujolr26

    (@araujolr26)

    I am trying to remove the Read More link at the end of my post. I would like to display the entire post. I have been looking at the forum for an answer to this but have been unsuccessful. I have tried changing ‘the_excerpt’ to ‘the_content’ in my index.php but it’s still showing on my main page. Here is the section of code:

    <h2 style="background-repeat: no-repeat;">Recent News</h2>
                    <?php
                    global $post;
                    $args = array('numberposts' => 2, 'offset' => 0, 'category' => get_cat_ID('News'), 'orderby' => 'post_date', 'order' => 'DESC');
                    $myposts = get_posts( $args );
                    foreach( $myposts as $post ) :  setup_postdata($post);
    						$externalUrl = get_post_meta();
                    ?>
                          	<?php
                            if ($externalUrl != NULL && $externalUrl != '' && strlen($externalUrl) > 0) { ?>
                                <h3><a>"><?php the_title(); ?></a></h3>
                            <?php } else { ?>
                                <h3><a>"><?php the_title(); ?></a></h3>
                            <?php } ?>
                            <h4><?php the_date(); ?></h4>
                            <p><?php the_content(",FALSE,"); ?></p>
                            <?php
                            if ($externalUrl != NULL && $externalUrl != '' && strlen($externalUrl) > 0) { ?>
                                <h5 class="whiteShadow"><a>">MORE</a></h5>
                            <?php } else { ?>
                                <h5 class="whiteShadow"><a>">MORE</a></h5>
                            <?php } ?>
    
                    <?php endforeach; ?>
                </div>

    Here is my site: frackingsenseless.org
    Thank you in advance for the help!

Viewing 1 replies (of 1 total)
  • The topic ‘Removing "Read More"’ is closed to new replies.