Add/Modify "Read More" Button

Homepage Community Forums Classik Theme Support Add/Modify "Read More" Button

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1506
    bshellhorse
    Customer

      Wes,

      It is taking some time, but I really am liking the templates.  I would like to figure how to make a change to the layout of this design.  On the portfolio page, I would like to show a little information about the image and then have a “button” that links to post and also be able to customize that button text.  In the Crystal theme, there is a “read more” button that appears and you can modify the button text.

      Is there a way to get a button to appear on the Classik portfolio page and, if so, anyway to customize the text?

      #1510
      Wes
      Moderator

        There is already a Read More button for the Classik theme portfolio.  Check out the demo – http://demo.appfinite.com/classik/portfolio/

        To get it to work, you’ll need to go to your Genesis Theme Settings, scroll to the bottom for the Portfolio Options and change “Select one of the following” to “Display Post Content” and then add the content limit….then it should show up.

        If you need to change the Read More text to say something different, you’ll need to edit  this in your page_portfolio.php file of the theme.

        #1525
        bshellhorse
        Customer

          is there a way to get a button like that and use the “excerpt” or maybe even pull from a custom field instead.

          #1531
          Wes
          Moderator

            To use the excerpt go into your page_portfolio.php file and change this –

            /** Customize the read more link */
            add_filter( 'get_the_content_more_link', 'custom_read_more_link' );
            function custom_read_more_link() {
            return '... <a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
            }

            To this –

            /** Customize the read more link */
            add_filter( 'excerpt_more', 'custom_read_more_link' );
            add_filter( 'get_the_content_more_link', 'custom_read_more_link' );
            add_filter( 'the_content_more_link', 'custom_read_more_link' );
            function custom_read_more_link() {
            return '... <a class="more-link" href="' . get_permalink() . '" rel="nofollow">Read More</a>';
            }

            #1538
            bshellhorse
            Customer

              I made the code change above and do not see a button.  I made sure I was using excerpts in Genesis theme settings and I cleared the cache.

              #1542
              Wes
              Moderator

                What is your link again?

                #1544
                bshellhorse
                Customer

                  Its http://ambitenergyrates.net/y2x9 and just look at any of the pages

                  #1549
                  Wes
                  Moderator

                    I did the exact steps above and it worked for me using the Classik theme.  Double check that you are adding the code in correctly on the page_portfolio.php file (replacing the existing code).  You can also take a look at how to add the read more button here – http://www.studiopress.com/tutorials/post-excerpts#content-more-link

                    Make sure you have the more link enabled on your posts.

                    #1554
                    bshellhorse
                    Customer

                      <blockquote cite="

                      /** Customize the read more link */
                      add_filter( ‘excerpt_more’, ‘custom_read_more_link’ );
                      add_filter( ‘get_the_content_more_link’, ‘custom_read_more_link’ );
                      add_filter( ‘the_content_more_link’, ‘custom_read_more_link’ );
                      function custom_read_more_link() {
                      return ‘… <a href=”‘ . get_permalink() . ‘” rel=”nofollow”>View</a>’;
                      }

                      ">

                      That is the code in my file, so I think I have the code correct.  I guess the problem is your last statement “make sure you have the more link enabled on your posts.”  Other than adding a <blockquote cite="<!–more–>” in the post, I do not know where to do that.

                       

                      #1556
                      Wes
                      Moderator

                        The code you just pasted is different than the code I pasted above.  Copy the code I pasted earlier exactly as it is inside your page_portfolio.php file and it should work.

                        I tested your code and noticed the apostrophes were different, and the last line of code didn’t match as well.  So the issue appears to be just the code itself.

                        Here is what happens for me once I select the “Excerpts” option in the Portfolio settings and add the code I pasted earlier – http://i.imgur.com/nLIAh.png

                        My last statement was actually referring to adding more tags in your posts if you haven’t already, but that shouldn’t effect rather the read more button shows or not.  Again, the reason it wasn’t showing was due to your code being different than what I pasted earlier.  So once you add in the correct code above, it should work, and you can rename the “Read More” to whatever you want it to say….just make sure and leave everything else as is or it will cause another error.

                        Let me know if you get it working.

                        #1560
                        bshellhorse
                        Customer

                          I have replaced with this code, which to me seems identical to your code:

                          <code>

                          /** Customize the read more link */
                          add_filter( ‘excerpt_more’, ‘custom_read_more_link’ );
                          add_filter( ‘get_the_content_more_link’, ‘custom_read_more_link’ );
                          add_filter( ‘the_content_more_link’, ‘custom_read_more_link’ );
                          function custom_read_more_link() {
                          return ‘… <a href=”‘ . get_permalink() . ‘” rel=”nofollow”>Read More</a>’;
                          }
                          </code>

                          I clear my cache and tried adding a <code><<!–more–></code> and deleting it.  Still not getting it.

                          #1562
                          Wes
                          Moderator

                            The code that you just pasted above is showing differently than what I pasted.  Its your apostrophes.

                            When I paste the code I posted earlier it works, but when I paste your code it shows errors, and its due to your apostrophes.  Maybe your keyboard settings are different or something.

                            If you can create a temporary login, I can go in and quickly paste the correct code in for you and it will work.

                            #1563
                            bshellhorse
                            Customer

                              i copied and pasted from above.  Not sure what is going on.  I sent you login via the contact us page.

                              #1568
                              Wes
                              Moderator

                                I just took a quick look, but I’m not sure why its not working, there is definitely something else preventing it from working.  The code is the same, I think it was just showing up weird when you posted it here in the forum, so thats not whats causing it.

                                I noticed you had a few plugins installed,  I would try deactivating each one to see if it makes a difference (make sure you have the excerpt option enabled while testing this).

                                #1570
                                bshellhorse
                                Customer

                                  i have the excerpt selected on the portfolio page setting.  I deactivated every plugin and cleared my cache. Nothing.  Not sure what to do at this point.  Thanks for your help.

                                Viewing 15 posts - 1 through 15 (of 15 total)
                                • The topic ‘Add/Modify "Read More" Button’ is closed to new replies.