Skip to content

Instantly share code, notes, and snippets.

View marisqaporter's full-sized avatar

marisqaporter

View GitHub Profile
@marisqaporter
marisqaporter / functions.php
Last active January 28, 2016 03:47
Edit the header size (css and php) in Genesis.
//edit lines 84-89 of functions.php of your genesis parallax theme to your logo's height and width
add_theme_support( 'custom-header', array(
'width' => 300,
'height' => 70,
'header-selector' => '.site-title a',
'header-text' => false,
) );
@marisqaporter
marisqaporter / shortcodesultimate-solutionspage.html
Last active August 29, 2015 14:21
Shortcodes Ultimate without Types and Views Solution
<div class="section-inner">
<div class="inner-copy">
<div class="col-fourth"></div>
<div class="col-three-fourth">
<h2 class="red">solutions for nonprofits</h2>
</div>
[su_tabs vertical="yes" class="services-tab"]
[su_tab title="Beautiful Web Experiences"]
<h3 class="solutions">beautiful web experiences</h3>
<div class="col-half"><img class="beautiful-web alignnone size-full wp-image-76" src="http://demo5.aistaging.net/wp-content/uploads/2015/04/sf-arete-services-web.jpg" alt="sf-arete-services-web" width="900" height="600" /></div>
// Add custom post class to posts in the "Featured" category
add_filter('post_class', 'eo_custom_post_class');
function eo_custom_post_class($classes)
{
$new_class = 'featured-post';
if (in_category('Featured'))
$classes[] = esc_attr(sanitize_html_class($new_class));
return $classes;
}
@marisqaporter
marisqaporter / flex1child.css
Last active August 29, 2015 14:22
Flexbox Use Case 1
.add-on {
/*ie9*/
padding:0;
margin:10px;
float:left;
box-sizing:border-box;
/*end ie9*/
background-color:#fff;
width:340px;
}
@marisqaporter
marisqaporter / repositionsecondary.css
Last active August 29, 2015 14:22
Position Primary or Secondary Menu above Header in Parallax Pro by Genesis
.site-header {
top:56px;
}
.admin-bar .site-header {
top:88px;
}
.nav-secondary {
position:fixed;
width:100%;
margin-top:0;
@marisqaporter
marisqaporter / parallax-no.css
Last active November 1, 2018 09:58
disable parallax effect on parallax pro theme by genesis
/* Disable Parallex effect on Home Sections 1, 2, and 3
--------------------------------------------- */
.home-section-1, .home-section-3, .home-section-5 {
background-attachment: scroll;
background-color: #fff;
background-position: 50% 0px;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
@marisqaporter
marisqaporter / types-accordion.css
Last active August 29, 2015 14:23
Types and Views: Accordion Spoiler with Custom Post Types
.federal-program {
overflow:hidden;
margin:40px;
text-decoration: none;
display: block;
color: white;
flex:0 1 auto;
overflow:hidden;
max-width:100%;
padding:20px 30px 15px;
@marisqaporter
marisqaporter / accordion-spoiler-su.html
Last active August 29, 2015 14:23
Accordion Spoiler SU only
[su_accordion class="fed"]
<div class="federal-program">
[su_spoiler icon="chevron" title="School Breakfast Program"]<p class="copy white">
The School Breakfast Program (SBP) is a federally funded meals program that started in 1966. The SBP provides nutritious breakfasts to students and gets them ready to learn. As with the case with school lunches, children are eligible for free, reduced, or fully-paid breakfasts based in their families’ incomes. Unfortunately, Connecticut is last in the nation for the number of schools offering school breakfast and only 39.1% of low-income students are eating breakfast at school.</p>[/su_spoiler]
</div>
<div class="federal-program">
[su_spoiler icon="chevron" title="SUMMER MEAL PROGRAMS"]<p class="copy white">
These programs include the Summer Food Service Program (SFSP) and the Seamless Summer Option of the National School Lunch Program. They were created to provide the benefits of school lunch and breakfast during the summer when school is not in session. Su
@marisqaporter
marisqaporter / loop-multi-instance-combo.html
Created June 16, 2015 19:56
Types and Views: Combine two multi instance custom fields in loop
<ul>[wpv-for-each field="wpcf-program-basic-title"]<li><a href="[types field="program-basic-url" output="raw"][/types]" style="color:#fff;" target="_blank">[types field="program-basic-title"][/types]</a></li>[/wpv-for-each]</ul>
/**
*
* @author Calvin Makes
* @link http://www.calvinmakes.com/
* @version 1.0
*
* Add previous and next buttons to custom post types.
*/
function cm_custom_navigation_links() {