Forums

Excerpt - HELPPPPPPPPP!!!!!!! (16 posts)

  1. wacek
    Member
    Posted 10 months ago #

    I’m basically against the wall. They said it is going to be easy – but it’s not.

    I’m completely new to websites and wordpress.

    Excerpt ...

    I can’t get to show part of the article on „home“ (like 50 or 60 words) and than have „click more“ to go to whole article. I read wordpress help, went to many, many help sides. I see the codes . I even added them to functions.php (I locked my side for a while but I reinstall folder and now it’s fine) . But nothing works. I opened „more“ in menu to add part of the article that I want to have on „home“ I add [...] to main article and in excerpt window – nothing.

    Can anybody help with some kind of step by step? Where to go, what to copy, where to paste it?

  2. Max
    Member
    Posted 10 months ago #

    Read: the_excerpt

  3. wacek
    Member
    Posted 9 months ago #

    Max- thanks for quick reply. I read, I will say about 20 different posts about excerpt. I did copy and paste all kinds of codes to the point that I locked my site. I reinstall folder and I go it back.
    But as far as excerpt - nothing works...:-(
    It says in your link (I read it before about 5 times) that this process should happened automatically. Unfortunately it isn't.
    Like I said before - I'm completely green in website/wordpress etc.
    I really don't know what is wrong with it.

  4. alchymyth
    The Sweeper & Moderator
    Posted 9 months ago #

    what theme are you using?

  5. wacek
    Member
    Posted 9 months ago #

    Twenty Eleven

  6. alchymyth
    The Sweeper & Moderator
    Posted 9 months ago #

    if you haven't already, please make sure to create a child theme of Twenty Eleven to work with; http://codex.wordpress.org/Child_Themes

    in Twenty Eleven, the code for the home page posts is in content.php;

    this section:

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    		<div class="entry-summary">
    			<?php the_excerpt(); ?>
    		</div><!-- .entry-summary -->
    		<?php else : ?>
    		<div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>

    to get the excerpts on the home page, you could change the first line:
    <?php if ( is_search() ) : // Only display Excerpts for Search ?>
    to:
    <?php if ( is_home() || is_search() ) : // Only display Excerpts for Search ?>

  7. wacek
    Member
    Posted 9 months ago #

    I don't have enough words to describe how much I want to thank you!!!!
    After two sleepless nights, simple fix and everything looks ok.
    Thank you "alchymyth" - thank you again!!!

  8. wacek
    Member
    Posted 9 months ago #

    One more question. I have installed Advanced Excerpt and I think it is working.
    But I see two "read more" buttons.
    I belive one that is attached to the text with ... is comming form the plugin.
    The one two lines under the text "Read More..." I want to remove.
    Any suggestion how can that be done?

  9. alchymyth
    The Sweeper & Moderator
    Posted 9 months ago #

    Twenty Eleven adds these 'read more' links to the excerpt via a filter function;

    to remove these, edit functions.php of your child theme ( http://codex.wordpress.org/Child_Themes#Using_functions.php ), and add:

    add_action('after_setup_theme','remove_readmore_from_excerpt');
    function remove_readmore_from_excerpt() {
    remove_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' );
    remove_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );
    }
  10. wacek
    Member
    Posted 9 months ago #

    add anywhere in the window of functions.php?

  11. alchymyth
    The Sweeper & Moderator
    Posted 9 months ago #

    have you read: http://codex.wordpress.org/Child_Themes#Using_functions.php

    a new functions.php needs to start with:

    <?php

    no lines or characters before that.

    then add the suggested code.

  12. wacek
    Member
    Posted 9 months ago #

    Thank you again "alchymyth"

  13. wacek
    Member
    Posted 9 months ago #

    Ok - I did what you suggest!!!! I learned about CSS for the first time in my life! I'm a musician by the way and those things are a little bit confusing me.
    But there is a problem (with my luck...)
    I did create child theme and turned it on. Everything is there except my header is different (I was using a picture) and background shows just a color - I was using picture as well.
    My codes for CSS folder for child theme is:

    /*
    Theme Name: MyTheme
    Theme URI: http://wordpress.org/
    Description: Child Theme for Twenty Eleven
    Author: Zlotobrazowa
    Author URI: http://mysite.com/
    Template: twentyeleven
    Version: 0.1
    */

    @import url("../twentyeleven/style.css");

    is there something I did wrong or I have to change it in child theme instead of main theme?

    I forgot to add.
    My CSS is located:
    wp-content/themes/child/css.

  14. alchymyth
    The Sweeper & Moderator
    Posted 9 months ago #

    Everything is there except my header is different (I was using a picture) and background shows just a color - I was using picture as well.

    unfortunately, you will need to customize them again under dashboard - apperance - header and dashboard - apperance - background

    possibly you might be able to use the already uploaded images again, i.e. choose them from the media library;
    or hopefully you remember which images you have used ...

  15. wacek
    Member
    Posted 9 months ago #

    It's ok - I have them in the folder.
    Thank you again...:-)

  16. wacek
    Member
    Posted 9 months ago #

    Alchymyth - two more questions if you don't mind...
    1.Excerp is not working in archives.
    2.The middle backround.
    I changed main backround to a picture - succes.
    The middle backround stays white (original)
    Is there a way to change it? Where shoudl I look for the codes?
    Should I change it in child or main theme?
    Is there a way to change a color for sidebar?
    Again - in the child or main?

Reply

You must log in to post.

About this Topic

Tags