Skip to content

Instantly share code, notes, and snippets.

View frankschrijvers's full-sized avatar

WPStudio frankschrijvers

View GitHub Profile
@frankschrijvers
frankschrijvers / functions.php
Created September 15, 2016 07:43
Activate default sidebar
unregister_sidebar( 'sidebar' );
@frankschrijvers
frankschrijvers / functions.php
Created September 15, 2016 07:36
remove unregister sidebars
genesis_unregister_layout( 'content-sidebar' );
genesis_unregister_layout( 'sidebar-content' );
@frankschrijvers
frankschrijvers / functions.php
Created April 13, 2016 12:37
Redirect homepage on mobile
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Redirect homepage on mobile
add_action( 'wp_head', 'wps_params', 10 );
function wps_params() {
?>
<script>
if (window.location.pathname == '/' && jQuery(window).width() <= 480) {
@frankschrijvers
frankschrijvers / text.txt
Created July 6, 2016 20:54
first paragraph
<p class="intro>....your text here.....</p>
@frankschrijvers
frankschrijvers / text.txt
Created June 14, 2016 11:06
CTA text widget Seasons theme
<h3>Genesis e-commerce Theme</h3>
<h4>Start earning money by selling your products online</h4>
<a href class="button">Purchase Theme</a>
@frankschrijvers
frankschrijvers / text.txt
Created June 13, 2016 11:01
Shortcode WooCommerce
[recent_products per_page="5" columns="5"]
@frankschrijvers
frankschrijvers / functions.php
Last active June 6, 2016 12:23
Modify the Genesis read more link
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Modify the Genesis read more link
add_filter( 'excerpt_more', 'wps_read_more_link');
add_filter('get_the_content_more_link', 'wps_read_more_link');
function wps_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '">Continue Reading<span class="screen-reader-text">' . get_the_title() . '</span></a>';
@frankschrijvers
frankschrijvers / functions.php
Last active June 6, 2016 12:16
Modify the Genesis content read more link
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Modify the Genesis content read more link
add_filter( 'get_the_content_more_link', 'wps_read_more_link' );
add_filter( 'the_content_more_link', 'wps_read_more_link' );
function wps_read_more_link($more) {
$read_more_title = sprintf( '<span class="screen-reader-text">%s %s</span>', __( 'about ', 'seasons' ), get_the_title() );
return sprintf( ' ... <a href="%s" class="more-link">%s %s</a>', get_permalink(), __( 'Continue Reading', 'seasons' ), $read_more_title );
@frankschrijvers
frankschrijvers / functions.php
Created June 3, 2016 14:34
Add Accessibility support
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Add Accessibility support
add_theme_support( 'genesis-accessibility', array( '404-page', 'drop-down-menu', 'headings', 'rems', 'search-form', 'skip-links' ) );
@frankschrijvers
frankschrijvers / index.html
Created June 3, 2016 14:20
read more link genesis
<a href="https://www.wpstud.io/post-examples class="more-link">[Read more...] <span class="screen-reader-text">about Post examples</span></a>