Jump to content
Sign in to follow this  
pracede

How To Customize Read More Link

Recommended Posts

Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
pracede    0
pracede

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
pracede    0
pracede

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

Share this post


Link to post
Share on other sites
cerchris    0
cerchris

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
Rob    547
Rob

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.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
cerchris    0
cerchris

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
Danny    1,327
Danny

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.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
cerchris    0
cerchris

Hi Danny

 

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

Share this post


Link to post
Share on other sites
knubbl    0
knubbl

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
Rob    547
Rob

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?


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • reklov79
      By reklov79+
      Hi,
      Meganav seems to have a bug if you upload a Logo with a higher resolution (which actually is useful as it looks then sharper on mobile phones). But on mobile the Logo is then larger than on a desktop. Problem is the following code in the meganav style.css. Simply the "height: auto !important" needs to be removed.
      @media (max-width: 480px) { style.css?ver=5.0.14:133 body .meganav-logo img{ height: auto !important; } } But how to achieve that? What is the standard method for customizing that? Overriding via CSS / LESS doesn't work - in this case especially because of the !important derictive used in the original CSS I believe.
      Changing the original CSS is something I don't want to do as it leads into issues when upgrading.
      Btw: I seem not to be the only one with that issue - anyhow, the solution here (not displaying the Logo on mobile) is not acceptable for me.
      Thanks,
      Volker
       
    • marcuscarson
      By marcuscarson
      I'm hoping to create multiple blog pages where each one only shows posts from a specific category.
       
      For example:
      Page 1: site.com/category/food Page 2: site.com/category/animals Page 3: site.com/category/mineral Currently, when I try to place a masthead section with a unique title at the top of one of these pages, the same masthead section appears on all of them. I have "unlinked" the page from any sort of template, and I have tried to create a unique templates for each. In all instances, the changes I make on one appears on all the other (except for the posts that are being displayed).
       
      Is it possible to do what I'm trying to accomplish? Any help is appreciated.
    • bwdsl247
      By bwdsl247
      Unless I am doing something wrong, I can confirm - and can replicate on demand - that DMS has a bug that causes the following things to occur whenever I click 'Customize' or go to Themes and switch to another Theme and then go back to DMS. 
       
      (Danny, you'll be happy to know that before reporting this, I deactivated all my plug-ins :-)  
      See DMS debug info below confirming this. 
       
      Here's what happens when I click 'Customize' or switch Themes:
       
      1. Custom CSS/LESS is wiped out.
      2. Main site logo is replaced with DMS2 logo; other DMS sample content appears on Home page, Headers and Footer.
      3. My existing post and page text and images are still there, but all headers and footers have been replaced, and all formatting lost.
      4. Debug mode was ON before clicking 'Customize' or switching Themes; afterwards, it shows set to off.
       
      There are currently no other users accessing the system. 
       
      I can replicate it on demand and recorded a video showing what happens. I am uploading it and will post it shortly for you to see.
       
      Is there anything I'm doing incorrectly, or is this a bug?
       
      Thank you!
       
      Scott
       
      =====
       
      DMS Debug Info WordPress Version
      4.0
      WordPress Debug
      Disabled
      Multisite Enabled
      No
      Current Role
      Administrator
      Framework Path
      /nas/wp/www/cluster-1349/bwise/wp-content/themes/dms/dms
      Framework URI
      http://bwise.wpengine.com/wp-content/themes/dms/dms
      Framework Version
      2.1.5
      PHP Version
      5.3
      WP_DEBUG
      No
      WP memory limit
      40 MB
      WP MAX memory limit
      256 MB
      PHP memory limit
      256 MB
      Mysql version
      5.5.27
      WP Max Upload Size
      50 MB
      PHP POST Max Size
      100 MB
      PHP Max Execution Time
      3600s
      PHP type
      Apache2handler
      WebServer software
      Apache
      PHP User
      Posix functions are disabled on this host. Not necessarily a problem, but if the user needs FTP/SFTP to install plugins/themes then creating CSS files might be an issue.
      OS
      Linux
       
      « Back
       
       
       
       
       
       
       
    • dbereit
      By dbereit
      Help! I spent several hours setting up my DMS 2 site, including some custom CSS. The only plugins running are the PageLines ones.
       
      I was frustrated when the Site Settings options would not allow me to save a custom text color, despite clicking the Publish button numerous times, and refreshing many times.
       
      I went into the WordPress dashboard, and clicked the Appearance > Customize option, thinking it might give me some additional editing options. Instead it opened the DMS tour, and wiped out ALL of the customizations I had previously set up.
       
      #1 question- can my work be restored?
       
      #2 question- will these bugs be fixed, so I don't experience these challenges in the future?
       
      I REALLY want to use DMS 2, but find times where it is buggy and problematic, which make me worry about long-term stability. If what happened to me today happened to a live, public site, I would be in big trouble.
    • jotaro
      By jotaro
      How can I put customized Home icon for iHeader Navigation?
×