Skip to content

Instantly share code, notes, and snippets.

View carasmo's full-sized avatar

Christina carasmo

  • Florida
View GitHub Profile
@carasmo
carasmo / read-more.php
Last active August 2, 2016 19:32
Check for the default <!--more--> and change it but leave custom <!--more Custom Text--> alone
<?php
// don't use
/** ======================================================================================
*
* Read More the_content_more_link
* Check for the default <!--more--> and change it
* but leave custom <!--more Custom Text--> alone
*
======================================================================================= */
@carasmo
carasmo / paginate-comments-in-genesis.php
Created July 14, 2016 19:43
Paginate Comments/Discussion in Genesis Child theme.
<?php
// don't use above. Put this in your functions.php file.
/** ======================================================================================
*
* Paginate Comments
*
======================================================================================= */
function yourprefix_paginate_comments() {
@carasmo
carasmo / simple-social.css
Created July 24, 2016 17:24
This goes inside a directory titled 'css' inside your theme child directory = themename/css
/* ## Simple Social Icons for FontAwesome Use
--------------------------------------------- */
.simple-social-icons {
overflow: hidden;
}
.simple-social-icons ul {
margin: 0;
padding: 0;
@carasmo
carasmo / simple-social-for-functions.php
Last active July 24, 2016 18:46
Add and re-order Simple Social Icons, remove plugin css, add FontAwesome, add new styles (https://gist.github.com/carasmo/5a40a72ef6503e4545fc38a6933fab4a)
<?php
//* do not add this opening php tag above
//* this code is intended for your child theme's functions.php file or functions plugin
//* IMPORTANT: use a code editor and ftp to add code to your functions.php NOT the appearance editor
//* change yourprefix in the functions and handles
// see file https://gist.github.com/carasmo/5a40a72ef6503e4545fc38a6933fab4a for the css
/** ======================================================================================
*
@carasmo
carasmo / gist:a6315d4cccb8f498de38095c9d5ad57d
Created August 7, 2016 00:10
add dashicons to genesis nav menu
//* Goes in functions.php
/**
*
* Add Front End Dashicon Support
*
*/
function yourprefix_add_front_end_dashicons() {
wp_enqueue_style( 'dashicons' );
@carasmo
carasmo / read-more.php
Last active October 29, 2016 20:27
Read More for all reasons Genesis
<?php
/**
*
* Read More :: the_content_more_link
* when full content is chosen in Genesis Settings and user has added <!--more-->
* Don't add paragraphs
*
*/
@carasmo
carasmo / home-page-foodie-pro.css
Last active November 2, 2016 22:06
Full Width CSS adjustments for home page of Foodie Pro Genesis Child Theme
/* register and hook the widget area in the genesis_before_content area for home page only */
/*fake demo only DON't use */
nav.nav-primary:after {
content: '';
width: 100%;
height: 0px;
padding-top: 30%;
background: url(http://shaybocks.co/foodiepro/wp-content/uploads/2012/01/nectarines-680x400.jpg) no-repeat center center;
background-size: cover;
@carasmo
carasmo / load-more.js
Last active December 16, 2016 00:11
load-more.js see https://sridharkatakam.com/load-posts-demand-using-ajax-genesis/ :: modified to scroll to top the loaded content
//* reference: https://sridharkatakam.com/load-posts-demand-using-ajax-genesis/
jQuery( function( $ ){
var page = 2,
loading = false;
$( 'body' ).on( 'click', '.load-more', function( ){
if( ! loading ) {
@carasmo
carasmo / functions.php
Last active January 19, 2017 20:06
Genesis Only: allow shortcodes and autoembed in Genesis Archive Intro Text output.
<?php
//do not add if it's already at the top of your page
// don't add the 'shorcode-support-archive-intro-text.php' one, this covers both.
/**
*
* Add shortcode and autoembed support to Archive Intro Text
* change yourprefix_ in two locations
*
*/
@carasmo
carasmo / move-comment-form-above-comments-genesis.php
Last active January 25, 2017 17:44
Move comment form above comments / discussion in Genesis
<?php
//do not add above php tag
/**
*
* add comment form above the discussion (list of comments)
* change yourprefix_ to yours
*/
function yourprefix_reorder_comment_form_before_discussion() {