WordPress.org

Support

Support » Themes and Templates » Excerpt not full on main page

Excerpt not full on main page

  • Hi,

    I am using the theme ‘Solid Mag’ and want summaries/excerpts on the front page/article category page/latest news page, instead of the full items.

    I can’t see a loop.php and the index.php doesn’t have the code people have mentioned.

    How can I sort this out?

    Site: http://www.mmmboptastic.com/site <- still WiP.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Under settings > reading in the administrator section, is latest posts or static page selected? If it’s static page, what’s selected?

    Latest Posts is selected. Also have summary selected for feeds.

    So, if latest posts is selected, WordPress firsts looks for front-page.php, then if that doesn’t exist, for home.php, then, finally, for index.php, which is required for a theme to be valid.

    Make sure to create a child theme first so your theme stays update safe!

    Let us know if you run into any other issues in your changes. Happy coding!

    This is the list of pages on editor for that theme:

    404 Template
    (404.php)
    Archives
    (archive.php)
    Author Template
    (author.php)
    Category Template
    (category.php)
    Comments
    (comments.php)
    Footer
    (footer.php)
    Theme Functions
    (functions.php)
    Header
    (header.php)
    Main Index Template
    (index.php)
    Admin.php
    Themater.php
    default-admin-options.php
    default-options.php
    menu-primary.php
    menu-secondary.php
    navigation.php
    Archives Page Template
    (page-template-archives.php)
    Contact Form Page Template
    (page-template-contact.php)
    Full Width, no sidebar(s) Page Template
    (page-template-full.php)
    Sitemap Page Template
    (page-template-sitemap.php)
    Page Template
    (page.php)
    post-noresults.php
    post-page.php
    post-single.php
    post.php
    Search Results
    (search.php)
    Search Form
    (searchform.php)
    Sidebar
    (sidebar.php)
    Single Post
    (single.php)
    Tag Template
    (tag.php)

    This is the contents of index.php:

    <?php global $theme; get_header(); ?>
    
        <div id="main">
    
            <?php $theme->hook('main_before'); ?>
    
            <div id="content">
    
                <?php $theme->hook('content_before'); ?>
    
                <?php
                    if (have_posts()) : while (have_posts()) : the_post();
                        /**
                         * The default post formatting from the post.php template file will be used.
                         * If you want to customize the post formatting for your homepage:
                         *
                         *   - Create a new file: post-homepage.php
                         *   - Copy/Paste the content of post.php to post-homepage.php
                         *   - Edit and customize the post-homepage.php file for your needs.
                         *
                         * Learn more about the get_template_part() function: http://codex.wordpress.org/Function_Reference/get_template_part
                         */
    
                        get_template_part('post', 'homepage');
    
                    endwhile;
    
                    else :
                        get_template_part('post', 'noresults');
                    endif; 
    
                    get_template_part('navigation');
                ?>
    
                <?php $theme->hook('content_after'); ?>
    
            </div><!-- #content -->
    
            <?php get_sidebars(); ?>
    
            <?php $theme->hook('main_after'); ?>
    
        </div><!-- #main -->
    
    <?php get_footer(); ?>

    I believe the instructions there in the comments are pretty explanatory 🙂

    It doesn’t answer my question. This is the content of post.php and I have no idea what I would change on it when pasted into post-homepage.php

    <?php global $theme; ?>
    
        <div <?php post_class('post clearfix'); ?> id="post-<?php the_ID(); ?>">
    
            <div class="postmeta-primary">
    
                <span class="meta_date"><?php echo get_the_date(); ?></span>
               &nbsp;  <span class="meta_categories"><?php the_category(', '); ?></span>
    
                    <?php if(comments_open( get_the_ID() ))  {
                        ?> &nbsp; <span class="meta_comments"><?php comments_popup_link( __( 'No comments', 'themater' ), __( '1 Comment', 'themater' ), __( '% Comments', 'themater' ) ); ?></span><?php
                    }
                    ?>
            </div>
    
            <h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    
            <div class="entry clearfix">
    
                <?php
                    if(has_post_thumbnail())  {
                        ?><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(
                            array($theme->get_option('featured_image_width'), $theme->get_option('featured_image_height')),
                            array("class" => $theme->get_option('featured_image_position') . " featured_image")
                        ); ?></a><?php
                    }
                ?>
    
                <?php
                    the_content('');
                ?>
    
            </div>
    
            <?php if($theme->display('read_more')) { ?>
            <div class="readmore">
                <a href="<?php the_permalink(); ?>#more-<?php the_ID(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'themater' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php $theme->option('read_more'); ?></a>
            </div>
            <?php } ?>
    
        </div><!-- Post ID <?php the_ID(); ?> -->
    esmi

    @esmi

    Forum Moderator

    I’m sorry but your chosen theme is not released under GPL. Non GPL products are not welcome in the WordPress community. Official WordPress policy states that all plugins and themes that are publicly released are required to adhere to http://wordpress.org/about/gpl/

    Also, given this particular theme provider, I would strongly recommend that you read this article and consider changing to a theme from a reputable source asap.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Excerpt not full on main page’ is closed to new replies.
Skip to toolbar