Skip to content

Instantly share code, notes, and snippets.

View carasmo's full-sized avatar

Christina carasmo

  • Florida
View GitHub Profile
<?php
//don't add the opening php
// goes inside functions.php file in a child GENESIS CHILD THEME ONLY
/*====== PAGE CHILDREN ===================================================================================================================================================
/* If the page has sub pages, those pages and the title of the parent page shows up as a menu in the sidebar (if there's a sidebar)
/* if the page is set to full width, then nope
/* @genesis_sidebar
/* ul child is .children
/* reference in part List topmost ancestor and its immediate children title on this page:
@carasmo
carasmo / gist:e957c60c0107ff96fd43
Last active June 9, 2016 20:04
corrected-foodie-pro.php
<?php
/**
* Custom amendments for the theme.
*
* @package FoodiePro
* @subpackage Genesis
* @copyright Copyright (c) 2014, Shay Bocks
* @license GPL-2.0+
* @link http://www.shaybocks.com/foodie-pro/
* @since 1.0.1
/* -- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
add to functions.php in a Genesis child theme
||||||||||||||||||||||||||||||||||||||||||||||||||||||| -- */
/**
============================================================
// GOES IN functions.php file
/**
# ---------------------------------------------------------------------------------------
# load latest font awesome from cdn
# @since 1.0
# ---------------------------------------------------------------------------------------
**/
function latest_font_awesome() {
wp_enqueue_style( 'font-awesome-latest', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' );
/* CSS Document */
/* GWS - 12/2015 */
body {
background-color: #FFF
}
h2,
h3 {
@carasmo
carasmo / any-markup-in-genesis.php
Last active January 26, 2016 20:11
Use any markup in Genesis example. Starting with the Genesis Sample. This example code goes in your child theme's functions.php file. NOTICE: that the id on the nav is #foo-nav if you use skip links (and you should) you will need to filter the genesis_skip_links_output.
<?php
// don't include this
/** ====================================================================================
*
* Use any markup in Genesis example. Starting with the Genesis Sample.
* This example code goes in your child theme's
* functions.php file. NOTICE: that the id on the nav is #foo-nav
* if you use skip links (and you should) you will need to filter
* the genesis_skip_links_output.
@carasmo
carasmo / add-to-functions.php
Last active January 26, 2016 20:24
Genesis filter genesis_skip_links_output to add the registerd menu 'foo-menu' to the array. See other gist https://gist.github.com/carasmo/a988e9b4126cdb9f28e6
<?php
// don't include this
/** ====================================================================================
* add skip links to new nav
* filter 'genesis_skip_links_output' to add new
* https://gist.github.com/carasmo/a988e9b4126cdb9f28e6
@carasmo
carasmo / single-product.php
Last active July 11, 2016 22:14
For Genesis Child Theme (or any child theme, or change the path on the load_template if a parent theme). These instructions will help you show a different single product template page based on the category slug. If this was helpful, saved you hours of time, please consider a small donation via PayPal to [email protected].
<?php
/** ====================================================================================
* Return single product template page based on category slug
==================================================================================== **/
/** ========== Instructions ========================================================
@carasmo
carasmo / example-cmb2-repeatable-group.txt
Last active June 21, 2022 01:42
example CMB2 repeatable group
/** ====================================================================================
* Functions file
==================================================================================== **/
function yourthemeprefix_yourcpt_metabox_register() {
$prefix = '_cmb_';
@carasmo
carasmo / remove-superfish-from-either-menu.php
Last active August 29, 2022 22:47
filter the Genesis navigation classes to remove super fish from either menu.
<?php
// don't include the php tag
// this goes in your functions.php file in your child theme. Use a code editor and FTP,
// do not edit php files with the editor in the backend of WordPress.
// Use developer tools if you do developer work.
/** ====================================================================================