Skip to content

Instantly share code, notes, and snippets.

@ozzyrod
ozzyrod / enable-debug.php
Created April 25, 2020 21:07
generate debug log in WP
<?php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
@ozzyrod
ozzyrod / hooks.php
Created June 20, 2018 17:41
Cookbook change image size on Print Page
<?php // Do not include this opening line in your functions.php
/**
* Remove the standard Cookbook image
*/
remove_action( 'cookbook_recipe_print_top', 'cookbook_template_image', 5 );
/**
* Add the image size you'd like used.
* See https://developer.wordpress.org/reference/functions/add_image_size/ for
@ozzyrod
ozzyrod / list item images.scss
Last active February 25, 2017 00:05
list item images
ul.arrow {
list-style: none;
> li {
list-style-type: none;
&::before {
background: url( "images/arrow-list.svg" ) no-repeat scroll center center / contain transparent;
content: "";
display: block;
@ozzyrod
ozzyrod / max-height.css
Last active January 25, 2017 20:21
max-height transitions
.show-hide-content {
height: auto; /* this should be set already, but just in case it isn't, it's necessary to have the height set to auto for this to work */
max-height: 180px; /* Set this to whatever you want the height to start off as */
overflow: hidden;
transition: max-height 0.2s ease-in-out;
}
.show-hide-content.full { /* The class "full" should be added with JS */
max-height: 100vh;
}
@ozzyrod
ozzyrod / focus-outline.css
Created January 29, 2014 03:16
Get rid of focus outline
.sub-menu-toggle:focus,
.menu-toggle:focus {
outline: none;
}
@ozzyrod
ozzyrod / responsive-menu-css.css
Last active April 23, 2019 05:54
Creates a mobile responsive menu in a Genesis child theme with support for collapsible sub menus.
/* Responsive Navigation
---------------------------------------------------------------------------------------------------- */
/* Standard Navigation
--------------------------------------------- */
nav {
clear: both;
}
@ozzyrod
ozzyrod / anitac.php
Created December 19, 2013 17:29
Anita Category issue
<?php
// Ignore the top <?php if including in your functions file
add_filter( 'genesis_post_meta', 'anitac_post_meta_filter' );
function anitac_post_meta_filter($post_meta) {
if ( is_home() ) {
$post_meta = '[post_categories before=""]';
return $post_meta;
}