Topic: Add a 'Read More' button to footer of Featured posts

Can anyone please advise me on how I can add a 'Read More' button (like the 'quick-read-more' that is used in index-news posts) to the index-featured posts on the home page?
Thanks!

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

That'll require rewriting of either template.php or tapestries.php, depending on which version you use of Arras Theme.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: Add a 'Read More' button to footer of Featured posts

I'm using Arras 1.4.2.

Is this a big job? And am I likely to run into problems?

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

Open template.php

Search for:

                    <div class="entry-summary">
                        <?php 
                        if ($display_type == 'default') {
                            echo arras_strip_content( get_the_excerpt(), arras_get_option('node_based_limit_words') );
                        } else {
                            echo get_the_excerpt();
                            ?>
                            <p class="quick-read-more"><a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'arras'), get_the_title() ) ?>">
                            <?php _e('Read More', 'arras') ?>
                            </a></p>
                            <?php 
                        } 
                    ?>

Change it into:

<div class="entry-summary">
                        <?php /*
                        if ($display_type == 'default') {
                            echo arras_strip_content( get_the_excerpt(), arras_get_option('node_based_limit_words') );
                        } else { */
                            echo get_the_excerpt();
                            ?>
                            <p class="quick-read-more"><a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'arras'), get_the_title() ) ?>">
                            <?php _e('Read More', 'arras') ?>
                            </a></p>
                            <?php /*
                        } 
                */    ?>

And add this to your default.css:

.posts-default .quick-read-more    { margin: 10px 0 0; }
.posts-default .quick-read-more a:link, .posts-quick .quick-read-more a:visited    { background: url(../../images/feed-title-white.jpg) top repeat-x #EFEFEF; color: #000; text-decoration: none; padding: 4px 10px; margin: 0; border: 1px solid #CCC; font-weight: 700; zoom: 1; *display: inline; display: inline-block; }
.posts-default .quick-read-more a:hover { background: #383332; color: #FFF; }
My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: Add a 'Read More' button to footer of Featured posts

Thanks so much!! The links have been inserted!

The styling still isn't working for some reason tho... I see where you were going with it, but I'm not sure why its not picking it up.

Any ideas?

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

Did you add it to your stylesheet? I noticed you don't use the default.css

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: Add a 'Read More' button to footer of Featured posts

yes I did - I'm using twintrack.css

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

It seems to be ok in all browsers except chrome...

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

Is this fix different for 1.4.3? I am unable to find anything resembling this in template.php.

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

That's in tapestries.php for 1.4.3.1

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: Add a 'Read More' button to footer of Featured posts

Would you mind updating this for 1.5.0.1?

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

pixelated.ca wrote:

Would you mind updating this for 1.5.0.1?

It will be very helpful to me too..

Thank!

Thumbs up

Re: Add a 'Read More' button to footer of Featured posts

I'm using 1.5.0.1, and would love to add a 'Read more' or '...' to the text extract in the node based home page display as well.  It looks like the fix above doesn't apply to 1.5.0.1?  Thanks for any help!

In the meantime I am just adding a manual excerpt to each post and finishing it with '...' or 'Read more'.  If you've got a lot of posts that would not be fun.  (Go to edit post, then scroll down until you see the 'Excerpt' box and you can add whatever text you would like to appear.)

Last edited by KathH (2011-02-16 22:56:43)

Thumbs up