Skip to content

Instantly share code, notes, and snippets.

View nickdavis's full-sized avatar

Nick Davis nickdavis

View GitHub Profile
@nickdavis
nickdavis / style.css
Created October 13, 2015 10:42
Keeping the header / header menu 'on top of' the first background image of the homepage on the Altitude Pro theme by StudioPress
/* Add this after the .site-header { position: static; } part of the (max-width: 1023px) media query */
.front-page .site-header {
position: fixed;
}
@nickdavis
nickdavis / date.php
Created January 14, 2016 17:11
Force Content / Sidebar layout on the Date archives of any Genesis theme
<?php
// Force content-sidebar layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
genesis();
@nickdavis
nickdavis / style.css
Last active January 19, 2016 21:49
Show an alternative logo on Kickstart date archive pages (a logo-alt.png file - of the same dimensions as the original logo - must be uploaded to the images folder in the theme folder)
/* Logo, hide text */
/* Existing CSS for reference */
.header-image .site-header .wrap {
background: url(images/logo.png) no-repeat left center;
padding: 0;
}
/* Show alternate logo on Date archives */
.header-image.date .site-header .wrap {
@nickdavis
nickdavis / single.php
Created February 12, 2016 13:45
Allow a custom background on Posts in the Kickstart Pro theme (http://docs.leanthemes.co/article/31-kickstart-customise-custom-background-posts)
<?php
/**
* Kickstart Pro
*
* @author Lean Themes
* @license GPL-2.0+
* @link http://demo.leanthemes.co/kickstart/
*/
add_action( 'genesis_after_header', 'kickstart_page_before' );
@nickdavis
nickdavis / style.css
Created February 12, 2016 13:58
Adjusting the lightness of the header image of the Milton theme (http://docs.leanthemes.co/article/40-milton-customise-lighten-header-image)
/* Existing style.css line to target */
.site-header .outer-wrap {
background-color: #000;
background-color: rgba( 0, 0, 0, 0.5 ); /* e.g. 0.2 would be lighter, 0.8 would be darker etc */
}
@nickdavis
nickdavis / functions.php
Created March 7, 2016 13:11
Add a featured image automatically to the top of single posts on the Kickstart Pro theme
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_action( 'genesis_entry_content', 'kickstart_post_featured_image', 9 );
/**
* Display Featured Image automatically at top of post (single view)
*
*/
function kickstart_post_featured_image() {
// If we're not viewing a post get out of here
@nickdavis
nickdavis / style.css
Created March 27, 2016 15:07
Some parts of the Kickstart Pro WordPress theme style.css file you may wish to edit if using a logo of a different size
/* The following is an extract from the style.css file, so the line numbers won't match the original */
/* Original style.css line number 1323 */
.header-image .site-title a {
background: none;
float: left;
height: 80px; /* Adjust to match new logo.png height */
max-height: 80px; /* Adjust to match new logo.png height */
padding: 0;
width: 155px; /* Adjust to match new logo.png width */
@nickdavis
nickdavis / style.css
Created April 19, 2016 17:52
Show an alternative logo on Kickstart blog page and blog posts (a logo-alt.png file - of the same dimensions as the original logo - must be uploaded to the images folder in the theme folder)
/* Logo, hide text */
/* Existing CSS for reference */
.header-image .site-header .wrap {
background: url(images/logo.png) no-repeat left center;
padding: 0;
}
/* Show alternate logo on Date archives */
.header-image.page-template-page_blog .site-header .wrap,
@nickdavis
nickdavis / style.css
Created May 9, 2016 12:51
Set all header tags to be white on the Kickstart Pro (from Lean Themes) contact page template
.page-contact .entry-content h2,
.page-contact .entry-content h3,
.page-contact .entry-content h4
.page-contact .entry-content h5,
.page-contact .entry-content h6 {
color: #fff;
}
@nickdavis
nickdavis / style.css
Created May 13, 2016 12:16
CSS that should be used in conjunction with template-unstretch.php (below) on the Kickstart Pro theme by Lean Themes. Please note we cannot provide support for customisations.
.page-template-template-unstretch .before-content-unstretch {
margin-bottom: -124px;
position: relative;
text-align: center;
top: -116px;
}
@media only screen and (max-width: 900px) {
.page-template-template-unstretch .before-content-unstretch {