Archived

This topic is now archived and is closed to further replies.

  • 0

How To Customize Read More Link


Question

12 answers to this question

Posted · Report post

If you wish to have the Learn More styled like a button, you would need to use HTML and CSS. You could use Bootstrap classes added to your links HTML.

 

For example:

 

 

Today’s classroom can be a very busy and stressful environment. To be able to meet each childs individual needs can be a real challenge. To help with this, I assist teachers to first learn how support themself then attend to the needs of the children.
<p></p>
<a href="#" class="btn btn-large btn-primary">Learn More</a>

 

If you wish to have a similar style such as the image you attached above, you will need to use your own custom CSS.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Danny

 

Wow that was easy - thanks so much!! Works well

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

You can change the text used for your continue/read more link by going to:

 

PageLines > Site Options > Blog & Posts > Continue Reading Link Text (When Using Excerpts)

 

Regarding the styling, you could simply use the CSS used for the primary button on the:

 

.continue_reading_link class

 

But if you wish to feel awesome and l33t, you can add the following code to your child theme/customize plugin functions.php file.

 

add_filter( 'continue_reading_link', 'custom_reading_link' );

function custom_reading_link( $link ) {

  $link = str_replace( 'class="', 'class="btn btn-primary ', $link );

// now return new link

return $link;
}

This basically inserts the .btn & .btn-primary classes into the continue reading link.

Share this post


Link to post
Share on other sites

Posted · Report post

I've add some code on .continue_reading_link class but it's not working !

Share this post


Link to post
Share on other sites

Posted · Report post

What is the complete CSS you added?

Share this post


Link to post
Share on other sites

Posted · Report post

Sorry i add an error ! Do not care about my precedent message

Share this post


Link to post
Share on other sites

Posted · Report post

Okay, did you manage to get it working?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi There

 

Found this post when searching and wondering if it is possible to create a button link in a boxes section? See http://janetnicol.co.nz/?page_id=23
in the 3rd box I have set the readmore link but want to make it look like the attached image

 

Wd I try putting this into the "Boxes custom class" field in the meta settings:

.fboxmore_link

 

Then use a variation of the php you have above in the functions.php file?

post-41056-0-06509900-1357609799_thumb.j

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,

 

You can change the text used for your continue/read more link by going to:

 

PageLines > Site Options > Blog & Posts > Continue Reading Link Text (When Using Excerpts)

 

Regarding the styling, you could simply use the CSS used for the primary button on the:

 

.continue_reading_link class

 

But if you wish to feel awesome and l33t, you can add the following code to your child theme/customize plugin functions.php file.

add_filter( 'continue_reading_link', 'custom_reading_link' );

function custom_reading_link( $link ) {

  $link = str_replace( 'class="', 'class="btn btn-primary ', $link );

// now return new link

return $link;
}

This basically inserts the .btn & .btn-primary classes into the continue reading link.

I did add the above code, however it didn't work. For some reason, the CSS classes are not added to the link. In order to check whether there was something wrong in general, I simply tried to customize the text using the continue_reading_link_text and it worked perfectly fine. When looking at it through Chrome, nothing is added to the a-tag. It seems to be the case that for some reason the $link parameter does not work?! I tried resetting the $link variable to something random, but it also didn't change the link. Really don't know what the issue is.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi,  This is a resolved topic.   Can you open a new topic, quote this and provide a link to the site in question, letting us know what are you trying to accomplish?

Share this post


Link to post
Share on other sites

Posted · Report post

Hi, it's sometimes difficult to place some things in boxes. However, I recommend using the WP-Boxer plugin which does allow buttons within boxes (which it calls Content Blocks).   I find it very easy to implement. The best part is, you apply the boxes to a post or page via shortcode, which means you can place them anywhere you'd like.  They're highly customizable as well.

Share this post


Link to post
Share on other sites

Posted · Report post

Hi Rob

 

I tried WP boxer pro and it came up with a warning conflict message. Also I am wanting my boxes to go in between a banner section and the content section like this http://janetnicol.co.nz/?page_id=23
I tried putting the short code in a "full width sidebar" by putting the the code in a text widget, that is when I got the warning message at the top of the boxes.

 

Is there a way to get a button link into a standard PL boxes section?

Share this post


Link to post
Share on other sites