• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Appfinite

Appfinite

Premium WordPress Themes for The Genesis Framework

  • Themes
  • Blog
  • Tutorials and Resources
  • Forums
  • Contact Us

Add/Modify "Read More" Button

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

  • This topic has 14 replies, 2 voices, and was last updated 10 years, 8 months ago by bshellhorse.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • October 1, 2012 at 11:46 pm #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?

    October 2, 2012 at 12:48 am #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.

    October 2, 2012 at 2:32 pm #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.

    October 2, 2012 at 4:04 pm #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>';
    }

    October 3, 2012 at 6:54 am #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.

    October 3, 2012 at 4:11 pm #1542
    Wes
    Moderator

    What is your link again?

    October 3, 2012 at 6:24 pm #1544
    bshellhorse
    Customer

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

    October 4, 2012 at 4:15 pm #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.

    October 4, 2012 at 5:29 pm #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.

     

    October 4, 2012 at 10:40 pm #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.

    October 5, 2012 at 12:15 pm #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.

    October 5, 2012 at 5:02 pm #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.

    October 5, 2012 at 7:36 pm #1563
    bshellhorse
    Customer

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

    October 6, 2012 at 4:24 pm #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).

    October 6, 2012 at 4:46 pm #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.

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

Primary Sidebar

Search Forums

Affiliate Program

Looking to earn some money? Join our Affiliate program and earn 35% of every sale you refer. Top referrers earn 40-50%.

Join Now →

The Genesis Framework

All of our themes are designed for the Genesis Framework. You will need to purchase Genesis in order to use any of our themes.

Purchase Genesis

Hire a Web Developer

Need help setting up or customizing your website?

Contact Us →

Search Full Site

  • Buy Genesis!
  • Shopping Cart
  • Themes
  • My Account
  • Support Forums
  • Tutorials and Resources
  • Privacy Policy
  • Contact Us
  • Follow Us on Twitter

Copyright © 2023 · Appfinite · Built With The Genesis Framework