Skip to content

Instantly share code, notes, and snippets.

@alexmustin
Last active August 18, 2022 23:00
Show Gist options
  • Save alexmustin/09ef43c1768ea60626e345d0206818dc to your computer and use it in GitHub Desktop.
Save alexmustin/09ef43c1768ea60626e345d0206818dc to your computer and use it in GitHub Desktop.
Custom Genesis Pagination functions and styles
<?php
// CUSTOM LABEL: PREVIOUS BUTTON.
add_filter( 'genesis_prev_link_text', 'modify_previous_link_text' );
function modify_previous_link_text($text) {
$text = '< PREV';
return $text;
}
// CUSTOM LABEL: NEXT BUTTON.
add_filter( 'genesis_next_link_text', 'modify_next_link_text' );
function modify_next_link_text($text) {
$text = 'NEXT >';
return $text;
}
.pagination {
display: block;
width: 100%;
ul {
display: block;
width: 100%;
padding-left: 0;
text-align: center;
li {
list-style-type: none;
display: inline-block;
padding: 5px 10px;
margin: 0 2px 0 0;
line-height: 1;
text-decoration: none;
&.active,
&:hover {
background: #ccc;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment