Skip to content

Instantly share code, notes, and snippets.

@BiancaNL
BiancaNL / block.php
Created September 27, 2021 11:37
Frost Dynamic Posts with Genesis Custom Blocks
<?php
//Variables
$number_of_posts = block_value( 'post-amount' );
$category = block_value( 'category' );
// The Query
$the_query = new WP_Query(
array(
'post_type' => 'post',
'posts_per_page' => $number_of_posts,
@BiancaNL
BiancaNL / functions.php
Last active October 13, 2021 06:28 — forked from cre8tivediva/functions.php
Rename the Genesis Portfolio Slug
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/**
* Rename slug in Genesis Portfolio Plugin.
*
* @author Anita Carter
* @link https://cre8tivediva.com/rename-genesis-portfolio-slug
*/
function rename_portfolio_custom_post_type_slug() {
<script>
// Get ToC div
toc = document.getElementById("ToC");
//Add a header
tocHeader = document.createElement("h2");
tocHeader.innerText="Table of contents";
toc.appendChild(tocHeader);
// Create a list for the ToC entries
@BiancaNL
BiancaNL / acf-gb-pricingtables.css
Last active February 13, 2023 14:19
ACF Gutenberg Blocks Pricing Tables
.acf-pricing-table {
float: left;
padding: 2%;
box-sizing: border-box;
}
.acf-pricing-table:first-of-type:nth-last-of-type(2),
.acf-pricing-table:first-of-type:nth-last-of-type(2) ~ .acf-pricing-table {
width: 50%;