• Hi folks,

    For my website i would like to use the tumbnail picture before the “read more”. I think this will make everything more attractive. Any way how to fix this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter jd4687

    (@jd4687)

    Also curious how to make the short post (before the “read more”) a little longer..

    Also curious how to make the short post (before the “read more”) a little longer..

    Hi,

    If you wish to include more words into the short version of all your posts, then you could simply replace the following line:

    <?php thebox_excerpt(40); ?>

    by, for instance:

    <?php thebox_excerpt(60); ?>

    in the content.php file (that’s line No.48) of your child theme; all your posts would then be automatically truncated after sixty words, instead of forty, on your main page.

    But if you wish to have complete control over the extent of the excerpt of each of your posts, then I think you should replace that same line:

    <?php thebox_excerpt(40); ?>

    by the following one:

    <?php the_content(); ?>

    in your content.php file, and then place a <!--more--> tag at the appropriate point in the source code of each of your posts (but that’s quite a bit of extra work for your existing posts). There’s more info in the Codex here.

    (Sorry, I’m unable to suggest a solution to your first request…)

    Fabio Rubioglio

    (@fabiorubioglio)

    hi,
    do you mean a featured image?
    To add a featured image in a WordPress post, edit the post and simply click on “Set Featured Image” link inside the meta box on the right.

    Thread Starter jd4687

    (@jd4687)

    Extending the number of words in the except doesn’t allow the excepts to be more than 55 words. No matter what high number I put in the following line. All excerpts seem to be cut off at 55 max.

    <?php thebox_excerpt(40); ?>

    An I don’t mean a featured image, just a thumbnail I use in the full post. See my website doesn’t show thumbnails, but the single posts do:

    Example (single post)

    Versus excerpts in overview :

    Any help?

    Chrisngc

    (@chrisngc)

    Extending the number of words in the except doesn’t allow the excepts to be more than 55 words. No matter what high number I put in the following line. All excerpts seem to be cut off at 55 max. […]

    Sorry, my mistake… The length of the excerpt is indeed set to 55 words. But it’s possible to change this if you copy the following code into the functions.php file of your child theme (for 80 words in the excerpt):

    function custom_excerpt_length( $length ) {
    	return 80;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    and then, of course, modify the appropriate line in the content.php file of your child theme:

    <?php thebox_excerpt(80); ?>

    (More info in the Codex here.)

    Thread Starter jd4687

    (@jd4687)

    Thanks!

    Any clue on the thumb nail issue?

    Thread Starter jd4687

    (@jd4687)

    One more question. The excerpt ignores all returns and paragraphs. Is this easy to fix?

    Check my site to see what i mean.

    Thread Starter jd4687

    (@jd4687)

    I read somewhere on this topic :

    Are the excerpts in question manually generated, or are they just the first x words of each post? My answer stays teh same either way, but the implementation changes. This is one of those things that you COULD spend hours coding, but I wouldn’t.
    If you manually generate the excerpts,, create an excel spreadsheet. Make columns for <img src=”, image location, ” align=”right”, etc. You want to be able to drop in two variables – image location and alt – and then copy the final column where you have a join bringing it all together. Drop in the variables, copy the code from the final column, and paste it into the excerpt field of the post along with your manual text.
    if you’re using automatic excerpts of the first x words of the post, then you just build the same functionality into the theme so that you generate the HTML for the excerpt and insert it whenever the excerpt is called. Either way technically works.

    Thread Starter jd4687

    (@jd4687)

    Anybody?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘thumnail before the "read more"?’ is closed to new replies.