WordPress.org

Ready to get started?Download WordPress

Forums

Dusk To Dawn
[resolved] excerpt in theme Dusk To Dawn (5 posts)

  1. Andreas
    Member
    Posted 2 years ago #

    I can't get the automatic axcerpt function in the theme dusk to dawn working. I could change in the content.php the code "content" to "excerpt" in ONE place and it showed me excerpts without "read more" links.

    Is it really necessary to change the code to get this functions? What do I miss to see?

    I tried to find solutions in reading the forum and wp topics but I can't get it solved.

    Please let me know where exact I have to change which code so I see excerpts instead of content in the blog. (I don't like the more tag!)

    THANKS!
    Andreas

    http://wordpress.org/extend/themes/dusk-to-dawn/

  2. Andreas
    Member
    Posted 2 years ago #

    Hello!

    Its a pitty, that there didn't come any answer till now. I know that it would be necessary to change the code more than one file. I would be very glad to get the correct info how to do it!

    Thanks!
    Andreas

  3. judepereira
    Member
    Posted 1 year ago #

    Replace:

    <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'dusktodawn' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'dusktodawn' ), 'after' => '</div>' ) ); ?>

    With:

    <?php if ( is_search() || is_home() ) : // Only display Excerpts for Search ?>
    			<?php the_excerpt( __( 'Continue reading <span class="meta-nav">→</span>', 'dusktodawn' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'dusktodawn' ), 'after' => '</div>' ) ); ?>
    		<?php else : ?>
    			<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'dusktodawn' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'dusktodawn' ), 'after' => '</div>' ) ); ?>
    		<?php endif; ?>

    In: content.php

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    @judepereira You're going to lose any change you make to the theme's files when the theme updates. It's always recommended to work within a Child Theme environment for these sorts of modifications.

  5. judepereira
    Member
    Posted 1 year ago #

    @andrew, Yes, I'll certainly do that.
    Thank you.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic