Skip to content

Instantly share code, notes, and snippets.

@briansteeleca
briansteeleca / wp-nav-menu-parameters.php
Created February 12, 2019 19:35 — forked from zgordon/wp-nav-menu-parameters.php
Demo of the possible menu parameters for wp_nav_menu
<?php
$args = [
// Location pickable in Customizer
'theme_location' => 'main-menu',
// Assigns a default menu to location
'menu' => 'Main Menu',
// Main wrapper around the ul of posts
'container' => 'div',
'container_class' => 'container-class',
'container_id' => 'container-id',
@briansteeleca
briansteeleca / _layout.svelte
Created February 18, 2021 16:17
Sapper + Svelte Image + Tailwind CSS
<script>
import Nav from '../components/Nav.svelte';
export let segment;
</script>
<Nav {segment}/>
<main>
<slot></slot>
@briansteeleca
briansteeleca / map-popup.php
Created May 4, 2022 13:58
GridBuilderWP Map Popup with Featured Image
add_filter('wp_grid_builder_map/marker_content',
function( $content, $marker ) {
ob_start();
$url = wp_get_attachment_url( get_post_thumbnail_id() );
$excerpt = get_the_excerpt();
if ( $url ) {
echo '<div class="wpgb-map-marker-img">';
echo '<div style="background-image:url(' . esc_url( $url ) . ');"></div>';
echo '</div>';
}
<p>In HTML, <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements">block-level elements</a> such as headers, paragraphs, and DIVs, occupy 100% of the width of their parent element. Their height depends on how much content they have inside.</p>
<h2 id="headings" tabindex="-1">Headings</h2>
<p>Heading font weights have been set to <code>normal</code> (default). You can override this for all headings in the SCSS default variables, or add a bold weight yourself on a per-heading or per-word basis, for emphasis.</p>
<p>Same as with paragraphs, headings have zero top margin while the bottom margin is set as equal to 3 <a href="/codebase-5/docs/1-getting-started/element-grid">element grid</a> units, or <em>one line-height of the default text size</em> (1.5rem) – thereby leaving an “empty line” gap between paragraphs and headings.</p>
<p>Heading sizes, weights and line heights are set using three SCSS maps in the default variables file – you can control the rhythm of each from there.</p>
<p>B
/* (Bricks adds this – it's NOT overridden by Codebase) */
/* headings */
h1,
h2,
h3,
h4,
h5,
h6 {
text-rendering: optimizeLegibility;
margin: 0;
@briansteeleca
briansteeleca / acf-experience-skill-export.json
Last active November 2, 2022 17:56
ACF fields for OxyProps Portfolio WebSite - Full build Part 2 (https://www.youtube.com/watch?v=qwb8oC_veaw&t=3s)
[
{
"key": "group_636145701ece0",
"title": "Experience-Skill Relationship",
"fields": [
{
"key": "field_636148bd139e0",
"label": "Experience Skill Relationship",
"name": "experience-skill-relationship",
"aria-label": "",