Skip to content

Instantly share code, notes, and snippets.

@feastdesignco
feastdesignco / modern-homepage-blocks
Last active October 7, 2022 22:37
modern-homepage-blocks
<!-- wp:paragraph -->
<p>First, update your post title to match your site tagline. Then, edit this paragraph to match your homepage's meta description tag, which should tell potential readers what your site specializes in. Keep it to no more than 2-3 sentences.</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2>Trending Recipes</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Edit this paragraph to tell your readers why these recipes are so popular right now</p>
@feastdesignco
feastdesignco / add_woocom_support
Created August 15, 2019 12:04
Adds back in woocommerce functionality removed from Feast themes 4.1.5+ - not tested
// Add support for WooCommerce features.
add_theme_support( 'woocommerce' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
add_theme_support( 'wc-product-gallery-zoom' );
if ( class_exists( 'WooCommerce', false ) ) {
require_once FEAST_DIR . 'lib/woocommerce.php'; // note: doesn't exist anymore
}
@feastdesignco
feastdesignco / modern-footer
Created July 8, 2020 09:03
modern-footer-demo-content
<!-- wp:paragraph -->
<p>A modern homepage includes unique content, and displaying your most popular posts and categories on the homepage, instead of simply the "most recent". Change this text to a 2-3 sentence intro to your site!</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2>Trending Recipes</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Search engines consider content at the top of the page to be the most important, so let's focus on showing the top recipes over the last 30 days first. Our readers are loving...</p>
@feastdesignco
feastdesignco / super-simple-modern-homepage
Last active June 11, 2020 10:17
super-simple-modern-homepage
<!-- wp:paragraph -->
<p>A modern homepage includes unique content, and displaying your most popular posts and categories on the homepage, instead of simply the "most recent". Change this text to a 2-3 sentence intro to your site!</p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2>Trending Recipes</h2>
<!-- /wp:heading -->
<!-- wp:shortcode -->
[fsri id="111,222,333,444"]
@feastdesignco
feastdesignco / modern-homepage-template
Last active June 11, 2020 10:15
modern-homepage-template
<!-- wp:paragraph -->
<p>A modern homepage for the themes includes unique content, and displaying your most popular posts and categories on the homepage, instead of simply the "most recent". </p>
<!-- /wp:paragraph -->
<!-- wp:heading -->
<h2>Trending Recipes</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
add_action( 'wp_enqueue_scripts', 'cookd_reenqueue_js' );
/**
* Add this to the code snippets plugin
* Adds the javascript necessary for the FacetWP plugin to function, when using the Feast Plugin's Modern Mobile Menu
* We're dropping support for FacetWP and recommend a more modern setup using proper categories:
* https://feastdesignco.com/how-to-use-categories/
* https://feastdesignco.com/food-blog-recipe-index-pages-need-content/
* https://feastdesignco.com/how-to/configure-category-pages/
* https://feastdesignco.com/food-blog-site-structure/
* https://feastdesignco.com/why-recipe-indexes-suck/
@feastdesignco
feastdesignco / custom_prevent_cat_description_output.php
Last active October 6, 2019 11:02
custom_prevent_cat_description_output
add_filter('widget_categories_args', 'custom_widget_categories_args_filter', 11, 1);
/*
* removes the "category description" from being displayed as the title tag in the category link for the "categories" widget
* not sure why they decided to do this by default - it's a dumb feature - but at least it can be filtered
* add this to the code snippets plugin
* reference: https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_categories_args
*/
function custom_widget_categories_args_filter( $cat_args )
{
$cat_args['use_desc_for_title'] = false; // bool or int
@feastdesignco
feastdesignco / display-mobile-newsletter.css
Last active September 26, 2019 09:33
display-mobile-newsletter-foodie-pro
/* insert into the "Additional CSS" to display the above-header-newsletter area on mobile
not recommended: https://feastdesignco.com/why-we-removed-the-banner-top-on-mobile/ */
@media only screen and (max-width: 420px)
#before-header {
display: block !important;
}
<?php
/**
* Template Name: Foodie-Pro-Style Recipe Index
*
* Replace the entire contents your cookdpro/templates/page-recipes.php with the contents of this file
* Make sure to use the content-sidebar layout (default), not secondary-sidebar-content layout
*
* @package CookdPro
* @copyright Copyright (c) 2019, Feast Design Co.
* @license GPL-2.0+