Skip to content

Instantly share code, notes, and snippets.

@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
*
======================================================================================= */
@billerickson
billerickson / page_featured_blog.php
Last active July 21, 2018 05:58 — forked from ChristopherNeetz/page_featured_blog.php
Genesis page template with full blog post and additional posts with excerpts
@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() {
@neilgee
neilgee / archive-title-removal.php
Created March 2, 2016 02:39
Remove Archive Title & Description from all the Genesis Archive Pages
<?php //<~ Remove me
//Removes Title and Description on CPT Archive
remove_action( 'genesis_before_loop', 'genesis_do_cpt_archive_title_description' );
//Removes Title and Description on Blog Archive
remove_action( 'genesis_before_loop', 'genesis_do_posts_page_heading' );
//Removes Title and Description on Date Archive
remove_action( 'genesis_before_loop', 'genesis_do_date_archive_title' );
//Removes Title and Description on Archive, Taxonomy, Category, Tag
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 );
@gnikolopoulos
gnikolopoulos / functions.php
Created August 27, 2015 10:47
Add Defer and Async Attributes to Render Blocking Javascript in WordPress
<?php
function defer_js_async($tag){
// scripts to defer.
$scripts_to_defer = array('script-name1.js', 'script-name2.js', 'script-name3.js');
// scripts to async.
$scripts_to_async = array('script-name1.js', 'script-name2.js', 'script-name3.js');
foreach($scripts_to_defer as $defer_script){
@jaredatch
jaredatch / functions.php
Created August 5, 2015 19:08
Tame Yoast plugins
<?php
// Tell Yoast Google Analytics plugin not to be at the top of the WP admin menu
add_filter( 'wpga_menu_on_top', '__return_false' );
// Disable additional WPSEO columns from the admin
add_filter( 'wpseo_use_page_analysis', '__return_false' );
/**
* Set WPSEO metabox to low so custom fields can appear above it
@jaredatch
jaredatch / functions.php
Last active February 28, 2022 22:04
Disable TinyMCE for specific page
<?php
/**
* Disable visual TinyMCE editor for specifc page/post
*
* @since 1.0.0
*/
function ja_disable_fancy_editor( $can ) {
global $post;
if ( 3441 == $post->ID ) {
@jaredatch
jaredatch / functions.php
Created August 5, 2015 14:57
Set fallback images for Genesis
<?php
/**
* Set default Genesis images
*
* @since 1.0.0
* @param string $output
* @param array $args
* @return array
*/
function ja_default_genesis_image( $output, $args ) {
@A5hleyRich
A5hleyRich / cron-test.php
Last active July 26, 2022 17:25
WordPress Cron and Email Test
<?php
/**
* Plugin Name: Cron Test
* Plugin URI: https://gist.github.com/A5hleyRich/6de1712ce5f46662c8ba
* Description: WordPress cron and email test.
* Author: Ashley Rich
* Version: 1.0
* Author URI: http://ashleyrich.com
*/