Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 30th Aug 2011, 06:49 PM   #1
Learn, Practice, Profit
War Room Member
 
Jimmy Sun's Avatar
 
Join Date: 2011
Posts: 23
Thanks: 31
Thanked 8 Times in 8 Posts
Default
How to make some text of "Read More" on wordpress not clickable?
Share on: 
fb share twitter share gplus share more share

hello all.. can I make some text of "read more" not clickable?

For example, let's say my post title is "Best Monitor", and I want the read more text to be:

Continue reading Best Monitor

I can do that using this code:
Code:
<?php the_content("Continue reading " . the_title('<b><i>', '</b></i>', false)); ?>
Now, I need to seperate "Continue reading" to be just text only (not link) and the link only to "Best Monitor".

I've seen a website doing this. How can I do that? Thank you very much.
Jimmy Sun is offline  
Unread 31st Aug 2011, 04:46 AM   #2
Active Warrior
War Room Member
 
Join Date: 2009
Posts: 97
Thanks: 4
Thanked 14 Times in 14 Posts
Default
Re: How to make some text of "Read More" on wordpress not clickable?
Share on: 
fb share twitter share gplus share more share

you just need to remove the "continue reading" from that line and place it in front of the php

HTML Code:
Continue reading <?php the_content(the_title('<b><i>', '</b></i>', false)); ?>
johnnyN is offline  
Unread 31st Aug 2011, 05:36 AM   #3
Warrior Member
 
Join Date: 2010
Posts: 27
Thanks: 0
Thanked 3 Times in 3 Posts
Default
Re: How to make some text of "Read More" on wordpress not clickable?
Share on: 
fb share twitter share gplus share more share

you need to add below code in your theme functions.php

PHP Code:
function new_content_more() {
       global ;
    return 
'Continue Reading <a href="'. get_permalink() . '">'.get_the_title().'</a>';
}
add_filter('the_content_more_link', 'new_excerpt_more'); 
PHP Code:
function new_excerpt_more() {
       global ;
    return 
'Continue Reading <a href="'. get_permalink() . '">'.get_the_title().'</a>';
}
add_filter('excerpt_more', 'new_excerpt_more'); 
note: editor removing variables from my code ,unable to post code correctly

wordpress developer @ 5$/hour bhuthecoder@gmail.com
bhuthecoder is offline  
Closed Thread


Bookmarks

Tags
clickable, make, read more, text, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:59 AM.