Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

[...] on excerpts - can they be made clickable links?

Old Feb 7, 2009, 04:44 PM
25 posts · Feb 2009

Is it possible to arrange thing such that the "[...]" that shows at the end of all excerpts is a clickable link to the full post?

Also, can we change the "..." to different text here?

Thanks in advance.
Old Feb 8, 2009, 01:33 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
I think this plugin may be able to do that but I am not sure http://wordpress.org/extend/plugins/advanced-excerpt/

Or use the "More Tag" in your posts. I understand that you want it automated for all posts but I have idea for that right now
Old Feb 12, 2009, 08:00 PM
MacMyDay's Avatar
23 posts · Feb 2009
Hey HalfWayThere & Flynn -

I tried the Advanced Exceprt, while it has nice features, it doesn't allow linking of the ellipsis. But did find this explanation and per the post has been tested on WP 2.7.x


I imagine it will work with Altahualpa.
Old Feb 12, 2009, 09:36 PM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
Good find, I have not thought about filters or that there would be one for the excerpt. You can add that code to the bottom of atahualpa/functions.php. It's important to not introduce any blank space or lines before or after the code. Add it tightly to the bottom of functions.php. (Spaces and blank lines INSIDE the opening and closing PHP tags are o.k., just not outside). The functions.php must end with a closing ?> and not have a space or blank line after that.
Old Feb 12, 2009, 11:49 PM
MacMyDay's Avatar
23 posts · Feb 2009
Excellent Flynn. That was the key. the ?>

Though this code allows you to link to the complete post from the excerpt, by eliminating or replacing the ellipsis the truncated text seems to hang... so I modified it a bit so that the ellipsis appears first then 'read more' eliminating the line break and making it seem more cohesive with the text of the excerpt. This is my implementation... this works for me and anyone else can modify this code...
//function to replace invalid ellipsis with text linking to the post  
function elpie_excerpt($text)  
   return str_replace('[...]', '<a href="'. get_permalink($post->ID) . '">' . ' [&hellip; Read More]' . '</a>', $text);  
add_filter('the_excerpt', 'elpie_excerpt');?>
I think this just gets pasted at the end of functions.php without any linebreaks or spaces. worked for me!

Last edited by MacMyDay; Feb 13, 2009 at 12:02 AM.
Old Mar 8, 2009, 10:21 AM
Shepherd Jim's Avatar
Shepherd Jim
301 posts · Feb 2009
Bristol, midcoast Maine USA
My wife wants to accomplish the same thing as MacMyDay = make the automatically inserted ellipsis "[...]" be clickable -- linking to the full post on a single post page.

I'm comfortable editing the functions.php file but am concerned that this is a change I will have to go back in and re-do every time the theme is updated/re-installed ...that is the case, right?

Is the mod to functions.php still the best way to perform this magic?

BTW -- how is it determined how long the "automatic excerpt" is? Can/could that be modified.

I've tried to convince Pam that she should start using the "More" button, but she's gotten very used to having the excerpt process happen without input from her.
Old Mar 8, 2009, 11:44 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
Looks like there's a new plugin that can put a custom More link, set the excerpt length and specify which HTML tags to strip/leave http://wordpress.org/extend/plugins/custom-excerpts/

The other excerpt plugin http://wordpress.org/extend/plugins/advanced-excerpt/ doesn't seem to allow More links

For just setting a More link, without setting excerpt length, the code from MacMyDay above placed at the bottom of functions.php would work, too.
Old Mar 9, 2009, 06:24 AM
Shepherd Jim's Avatar
Shepherd Jim
301 posts · Feb 2009
Bristol, midcoast Maine USA
Okay! I've installed that plugin "Custom Excerpts" and it does even more than we'd hoped:

1) we can choose the length in words of the excerpt created by the "automatic" excerpt process that WordPress performs without us inserting the <more> tag.

2) replace the standard ellipsis excerpt text "..." with "...Read More" or whatever else we'd like

3) the "...Read More" excerpt text can be set to "Dofollow" or "Nofollow" which makes it a hyperlink to the applicable single post page.

Question: The plugin's options page mentions "By making the excerpt link nofollow, pages where it's used will gain a small amount of PR."

What's "PR" and how much of a worry is this. I mean, making the excerpt text linkable was our whole goal in installing this plugin!

4) we are able to specify which, if any, html tags will be allowed to appear in excerpts. Note: I was not aware that WP woudl strip out any tags appearing the usual 55 word excerpts

Question: Why does WP strip out html in the excerpts and what's the danger of now going in and allowing some or all -- are some tags more dangerous than others

I'm just about reading to take our site "public" -- been building it in a subdirectory while our "old" html/frame-based site was "out" in the main directory with index.html online.
Old Mar 9, 2009, 07:21 AM
Flynn's Avatar
3,768 posts · Oct 2008
Munich, Germany
4) There's nothing dangerous about HTML tags, you can leave them all in. It's more a visual issue. For instance, by removing all HTML formatting all excerpts will use about the same amount of space in the layout. If you leave HTML tags, then an excerpt with a <ul><li>..</li></ul> unordered or ordered list may take much more space than another excerpt that has only plain text. So the layout won't look so streamlined anymore. This can be important in layouts where 2 excerpts are listed side by side and the containers of those should have the same height.

3) The more link goes to the single post page which are quite important pages, they should get their share of PR. You'd usually want the single post pages to rank well in the search engines. Those (and the "Page" pages) are the actual content pages of a site, not the overview pages like "category", "archives" etc. So I would not use nofollow there. I'd use nofollow for RSS links, login links, links to social bookmark sites, etc, but not for links to single post pages.

But it would make sense to include the title of the post in the linked more tag.
Continue reading <a href="..">Title of post</a>
should be better than <a href"..">Continue Reading</a>

But that would require that the plugin allows to use a placeholder for the automatic more tag. It probably doesn't have that and I know no other plugin that does.
Old Mar 9, 2009, 08:18 AM
Shepherd Jim's Avatar
Shepherd Jim
301 posts · Feb 2009
Bristol, midcoast Maine USA
Thanks Flynn! You really ARE everywhere and all-knowing!

You're right, the "Custom Excerpts" plugin does not appear to have the ability to refer back to the post by its name. I might suggest to the author that they include that in the future.

Thanks again!
Old Jun 28, 2009, 02:36 AM
149 posts · Apr 2009
Dev Env't: XP Pro SP3, IIS 5.1, MySQL 5.1, PHP 5.2.x, WP 2.7.1, Atahualpa 3.3.3, IE 7, FF 3.0.x
Allow me to open up this thread.

I was playing with the elpie code below, to try to solve the inconsistent "Continue to click" issue, re: WP's [...], and at first I thought it worked everywhere, but it doesn't.

Here are the conditions (note: when I refer to "Only Excerpts" that is a setting in ATO --> "Posts or Excerpts"):

1. If "Only Excerpts" is not set and the <!--more--> tag is used on a post, the elpie code below works.

2. If "Only Excerpts" is set and the <!--more--> tag is not used, the elpie code below works.

3. If "Only Excerpts" is set and the <!--more--> tag is used, the elpie code below does not work. You get the excerpt but no tag.

4. If "Only Excerpts" is set but an excerpt has been "hard coded" in Post Edit, even if you have the <!--more--> tag the elpie code below does not work.

The moral of this story seems to be that you either use the elpie code below (or not) and consistently use the <!--more--> tag, or you consistently "hard code" an excerpt for each Post (which, as I understand it, is preferable from an SEO perspective).

Hope this helps.

P.S. And maybe some day Flynn will whip out his magic keyboard, when he has some time, and develop a consistent solution for all occurrences of an excerpt.

Last edited by fromtheranks; Jun 29, 2009 at 12:49 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is it possible to have multiple clickable links in the Header or other graph Eric Bobrow Header configuration & styling 18 Mar 31, 2010 04:00 PM
How to edit links widget or how to have links in sidebar of page? Joelb53 Sidebars & Widgets 1 May 6, 2009 03:52 AM
Trying to insert multiple clickable images above my Logo whatsmytruth Header configuration & styling 1 May 1, 2009 12:07 PM
Made the change, now having widget problem paulae New Versions, & Updating 2 Apr 1, 2009 07:41 PM
Making clickable? gesman Header configuration & styling 6 Feb 8, 2009 01:48 PM

All times are GMT -6. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.