Last active
January 7, 2018 08:35
-
-
Save yuriitaran/5cb7cd8e5d76eee2c548d3f768a6fc0c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Modify The Read More Link Text | |
| function modify_read_more_link() { | |
| if(get_field('readmore_text', 'options')) { | |
| return '<a class="button" href="' . get_permalink() . '">' . get_field( 'readmore_text', 'options' ) . '</a>'; | |
| } else { | |
| return '<a class="button" href="' . get_permalink() . '"> ' . __( 'Readmore', 'theme_name' ) .' </a>'; | |
| } | |
| } | |
| // for content more link | |
| add_filter( 'the_content_more_link', 'modify_read_more_link' ); | |
| // for excerpt more link | |
| add_filter( 'excerpt_more', 'modify_read_more_link' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment