Skip to content

Instantly share code, notes, and snippets.

View thinkaboutit's full-sized avatar
🎯
Focusing

Federico thinkaboutit

🎯
Focusing
View GitHub Profile
@colorful-tones
colorful-tones / .gitignore
Last active February 27, 2025 18:17
An example .gitignore optimized for WP Engine hosting
#----------------------------------------
# This Git ignore should be located
# in your WordPress install's wp-content/
# directory.
#----------------------------------------
#---------------------------
# WordPress general
#---------------------------
/index.php
@ndiego
ndiego / block-variations-frost
Last active March 11, 2024 18:12
block-variations-frost
/**
* Add the following to a theme's functions.php file.
*/
function example_enqueue_block_variations() {
wp_enqueue_script(
'frost-enqueue-block-variations',
get_template_directory_uri() . '/assets/js/variations.js',
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' )
);
@wpcliffsnotes
wpcliffsnotes / acf-flexible-content.php
Created March 18, 2018 20:56
ACF Flexible Content
<?php
// check if the flexible content field has rows of data
if( have_rows('layout') ):?>
<!-- // loop through the rows of data-->
<?php while ( have_rows('layout') ) : the_row();?>
<?php if( get_row_layout() == '1_column' ):?>
<section class="section headline-content">
<div class="grid-container">
<div class="grid-x grid-margin-x">
<div class="large-12 cell">
@neilgee
neilgee / flexbox-woo-products.css
Last active September 16, 2021 13:47
Flexbox on WooCommerce Products
/* Flexbox on WooCommerce archive products */
.woocommerce .products ul,
.woocommerce ul.products {
display: flex;
flex-flow: row wrap;
}
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
display: flex;
@lgladdy
lgladdy / _wordpress_core.scss
Created April 13, 2014 19:02
WordPress Core Styles in SASS
/* =WordPress Core - Sassified.
-------------------------------------------------------------- */
.alignnone {
margin: 5px 20px 20px 0;
}
.aligncenter, div.aligncenter {
display: block;
margin: 5px auto 5px auto;
}
@studiopress
studiopress / columns.css
Last active July 23, 2024 20:27
Genesis column classes.
/* Column Classes
Link: http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css
--------------------------------------------- */
.five-sixths,
.four-sixths,
.one-fourth,
.one-half,
.one-sixth,
.one-third,
@chrisguitarguy
chrisguitarguy / comments-example.php
Created September 21, 2011 21:44
How to add custom fields to WordPress comments
<?php
/*
Plugin Name: Add Extra Comment Fields
Plugin URI: http://pmg.co/category/wordpress
Description: An example of how to add, save and edit extra comment fields in WordPress
Version: n/a
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: MIT
*/