layers_after_list_read_more
Back to Main Index
Outputs your custom code after the Read More button on the list pages and Blog template.
Location: partials/content-list.php
Code output appears after:
1 |
<p><a href="<?php the_permalink(); ?>" class="button"><?php _e( 'Read More' , 'layerswp' ); ?></a></p> |
Code output appears before:
1 |
</article> |
Usage:
1 |
add_action('layers_after_list_read_more', 'my_read_more'); |
This hook can be useful if you want to create your own custom post footer for list pages, or insert your own read more button. This example adds a read more button that uses the Layers Framework Secondary Button HTML and class. The default button can then be hidden in your child theme CSS with something like .archive article .button{display: none;}
1 2 3 4 5 |
if(! function_exists('my_read_more') ) { function my_read_more() { echo '<button class="btn-secondary my-read-more"><a href="<?php the_permalink(); ?>"><?php _e( 'Read More' , 'layers-child' ); ?></a></button>'; } } |