Tristan Michael Smith
Tristan Michael Smith

Reputation: 47

Wordpress article only shows first part of article

After changing my theme on my website, my articles do not show the hole article. it seems to only display the first part of the article and then it shows [...] I have changed the settings to display hole article. Am i missing another setting or is this a code error? You can view the website here [www.greywatershop.com.au][1]

  [1]: http://www.greywatershop.com.au/blog

Code for archives.php

    <?php
/**
 * The template for displaying archive pages
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Shopper
 */

get_header(); ?>

    <div id="primary" class="content-area">
        <main id="main" class="site-main" role="main">
            <?php if ( have_posts() ) : ?>

            <header class="page-header">
                <?php
                    the_archive_title( '<h1 class="page-title">', '</h1>' );                    
                ?>
            </header><!-- .page-header -->

                <?php get_template_part( 'loop' );

            else :

            get_template_part( 'content', 'none' );

            endif; ?>

        </main><!-- #main -->
    </div><!-- #primary -->

<?php
do_action( 'shopper_sidebar' );
get_footer();

Upvotes: 1

Views: 117

Answers (2)

Guillermo Carone
Guillermo Carone

Reputation: 838

the_excerpt() is a core WordPress function, so you won't find it in y our themes function.php file. What you need to do is the following

  1. If your theme has a single-blog.php file open it
  2. If it doesent then open the single.php file
  3. Look for the line of code were the_excerpt() is used
  4. Replace that function with the_content()

That will show the full content of your post in the single view.

Upvotes: 1

Zhuzhu
Zhuzhu

Reputation: 24

The problem is not in the archives.php file, it is in the loop template.

In the template file, there should be a the_excerpt(); function, replacing the function with the_content(); will solve the problem.

the_excerpt(); function will show part of the blog with an end of [...].

the_content(); function will show the whole blog.

Upvotes: 1

Related Questions