Skip to content

Instantly share code, notes, and snippets.

View nickcernis's full-sized avatar

Nick Cernis nickcernis

  • Innsbruck, Austria
  • 18:36 (UTC +02:00)
View GitHub Profile
<!-- Use this button code in your Home Section 1 text widget to point to your Real Music Rocks section: -->
<a class="button" href="#" data-section="home-section-2">Continue Reading</a>
<!-- Use this button code in the Home Section 2 text widget to point to the Your Favorite Songs Matter section: -->
<a class="button" href="#" data-section="home-section-3">Continue Reading</a>
<!-- Use this button code in the Home Section 3 text widget to point to the Event Schedule section: -->
<a class="button" href="#" data-section="home-section-4">Event Schedule</a>
<!-- Finally, you can use this button code in the Footer 1 text widget to send visitors to your contact page: -->
@nickcernis
nickcernis / footer.html
Last active September 15, 2015 18:38
Workaround for Parallax section scrolling on Rainmaker sites. Allows creation of click-to-advance “Continue Reading” buttons.
@nickcernis
nickcernis / style.css
Created December 7, 2014 15:29
AgentPress Pro Home Bottom featured posts instead of pages
.home-bottom .featuredpost .entry {
width: 23.875%;
}
.home-bottom.full-width .featuredpost .entry:nth-of-type(3n+1) {
clear: none;
margin-left: 1.5%;
}
.home-bottom.full-width .featuredpost .entry:nth-of-type(4n+1) {
@nickcernis
nickcernis / functions.php
Created December 4, 2014 13:04
Add or edit the notes before the WordPress comments form
<?php // remove this line
// Add or edit the notes before the comments form
add_filter( 'comment_form_defaults', 'sp_add_comment_form_before' );
function sp_add_comment_form_before( $defaults ) {
$defaults['comment_notes_before'] = '<p class="comment-notes">Your email address will not be published. Required fields are marked <span class="required">*</span></p>';
return $defaults;
}
@nickcernis
nickcernis / functions.php
Created December 4, 2014 10:10
Fix for breadcrumbs appearing on iThemes ghost pages with Genesis themes
<?php // be sure to remove this line!
// Workaround for iThemes Exchange breadcrumbs issue.
// Strip breadcrumbs on iThemes Exchange ghost pages unless
// Genesis settings have enabled breadcrumbs on pages.
add_action( 'genesis_before_content', 'studiopress_it_exchange_breadcrumbs' );
function studiopress_it_exchange_breadcrumbs() {
global $post;
<?php
/**
* Template Name: Full Width Content with Blog Posts
*
* @author Genesis Developer
* @link http://genesisdeveloper.me/full-width-page-content-with-blog-posts
* @license GPL-2.0+
* @since: 0.1
*/
add_action('genesis_after_header', 'wpsites_two_column_widgets');
/*** @author Brad Dalton* @example http://wpsites.net/* @copyright 2014 WP Sites */
function wpsites_two_column_widgets()
{
if (is_front_page() && is_active_sidebar('left-column') || is_active_sidebar('right-column')) {
echo '<div class="two-column-widgets">';
echo '<div class="wrap">';
genesis_widget_area('left-column',
array(
@nickcernis
nickcernis / functions.php
Created November 26, 2014 13:13
Add galleries to homepage posts in Mindstream
// Add galleries to posts on the homepage if they have them
add_action( 'genesis_post_content', 'sp_gallery_in_excerpt', 1 );
function sp_gallery_in_excerpt() {
if ( !is_home() && !is_front_page() )
return;
if ( get_post_gallery() )
echo get_post_gallery();
}
@nickcernis
nickcernis / page_blog.php
Created October 17, 2014 19:00
A custom loop that displays one post on the Genesis Blog template
<?php
// Template Name: Blog
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'newspro_do_custom_loop' );
function newspro_do_custom_loop() {
global $paged;
@nickcernis
nickcernis / Home Section 1 widget
Created October 16, 2014 11:47
How to modify the Parallax theme to add arrows on the homepage that autoscroll between sections
<!-- Add this to the bottom of your home section 1 widget in WordPress's Appearance > Widgets area-->
<a class="next-pane" data-goto=".home-section-2">&darr;</a>