Skip to content

Instantly share code, notes, and snippets.

View carasmo's full-sized avatar

Christina carasmo

  • Florida
View GitHub Profile
@carasmo
carasmo / example_wp_register_enqueue_script.php
Created March 6, 2016 17:34
example wp_register_enqueue
<?php
//don't use
// this goes in the child theme functions.php file
// See: https://codex.wordpress.org/Function_Reference/wp_register_script
// https://developer.wordpress.org/reference/functions/wp_enqueue_script/
function christina_register_enqueue_scripts() {
@carasmo
carasmo / gist:0cb2014f9a3673a3908c
Last active March 10, 2016 22:25
Replace breadcrumb on single attachment post
<?php
// don't use
//this goes inside the functions.php file in your Genesis child theme. USE FTP and a code editor.
/** ====================================================================================
Replace breadcrumb on single attachment post
@carasmo
carasmo / add-div-and-image-inside-site-header.php
Last active March 16, 2016 15:50
Genesis child theme: Add div and image inside .site-header, before logo just inside the .wrap - See ChristinaCreativeDesign.com for more Genesis goodness.
<?php
//* don't use
// this goes inside your functions.php file. Check your functions file if a different priority is required.
// use FTP and a code editor. Change the prefix_ in the two locations to your theme prefix. Do not use dashes or hyphens.
/** ====================================================================================
* Add div and image inside .site-header, before logo just inside the .wrap
@carasmo
carasmo / htaccess.txt
Last active May 15, 2017 00:29
Speed Up WordPress self hosted sites. This content goes inside the .htaccess file BEFORE the # BEGIN WordPress.
## If your server has a redirect problem with
## .htpasswds protection on wp-admin directory, add the following:
ErrorDocument 401 default
## ------- UNSET PRAGMA ------
## https://www.mnot.net/cache_docs/#PRAGMA
@carasmo
carasmo / readmore.php
Created March 31, 2016 14:25
Read More outside the paragraph
<?php
//don't include this
/** ====================================================================================
* Break more link outside the paragraph in the loop on all archives (home, archives, search, etc)
==================================================================================== **/
function yourprefix_excerpt_more_link() {
@carasmo
carasmo / ep_exclude_password_protected_pages.php
Last active June 8, 2016 18:54 — forked from bonny/ep_exclude_password_protected_pages.php
Automatically remove password protected page from wp_list_pages wherever this function is used such as the genesis sitemap.
/** ======================================================================================
*
* Automatically Exclude Password Protected Pages
*
* Kudos: https://gist.github.com/bonny/5772054
* The original (linked above) uses an argument:
* wp_list_pages('title_li=&post_type=faqs&echo=0&exclude_password_protected=1')
*
======================================================================================= */
function ca_exclude_password_protected_pages($pages, $r) {
@carasmo
carasmo / for-functions.php
Last active June 17, 2016 13:09
WordPress Admin Bar on the bottom without a plugin
<?php
//* don't use
/** ======================================================================================
*
* Admin Bar Bottom
*
* if you use the admin bar at the bottom on
* the backend add: html.wp-toolbar {padding-top:0px} to the CSS
*
@carasmo
carasmo / for-functions.php
Created June 17, 2016 18:55
Ouput shortcodes on the 2.3.0 TinyMCE Genesis Archive Intro Text
<?php
// don't add above. This goes inside your child theme functions.php file
/** ======================================================================================
*
* Add shortcode to the Genesis 2.3.0
* Archive Intro Text Output
*
======================================================================================= */
add_filter( 'genesis_term_intro_text_output', 'do_shortcode' );