Skip to content

Instantly share code, notes, and snippets.

@SitesByYogi
SitesByYogi / 3-column-layout.html
Created December 1, 2021 18:46
3 column layout to help solve BoldGrid PPB issue
<div class="boldgrid-section">
<div class="container">
<div class="row" style="padding-top: 50px; padding-bottom: 50px;">
<div class="col-md-4 col-sm-12 col-xs-12" style="box-shadow: #191919 0px 0px 0px 0px; border: 0px solid #a9a9a9;">
<h4 class="">Heading 1</h4>
<h4 class="">&nbsp;</h4>
<p class="">Nov 28, 2021</p>
<p class="">one two three four five six seven eight nine ten</p>
<p class="" style="text-align: left;"><a class="button-secondary" href="#">Read More</a></p>
@SitesByYogi
SitesByYogi / src-base.php
Last active March 14, 2022 13:37
Adds class to bg header
// Invoking core hook for plugins to hook first in place on the body content. Ref: https://core.trac.wordpress.org/ticket/46679.
do_action( 'wp_body_open' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'crio' ); ?></a>
<?php do_action( 'boldgrid_header_before' ); ?>
<div <?php BoldGrid::add_class( 'site_header', array( 'bgtfw-header', 'site-header' ) ); ?>>
@SitesByYogi
SitesByYogi / searchform.php
Created April 6, 2022 15:57
Add search form to Crio theme
<?php
/**
* The template for displaying search forms in the BoldGrid theme Framework
*
* @package Prime
*/
do_action( 'boldgrid_search_form' );
@SitesByYogi
SitesByYogi / add-copyright.html
Created May 9, 2022 11:59
add a copyright to your footer section (or any section) and have the year change automatically
@SitesByYogi
SitesByYogi / crio-header.html
Created May 19, 2022 12:25
Custom Crio Header
<div class="boldgrid-section" data-image-url="https://grepre5.dream.press/wp-content/uploads/2022/04/pexels-belle-co-5169050-scaled.jpg" style="background-image: linear-gradient(to left, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)), url('https://grepre5.dream.press/wp-content/uploads/2022/04/pexels-belle-co-5169050-scaled.jpg'); background-size: cover; background-position: 50% 46%;" data-bg-overlaycolor="rgba(255,255,255,0.76)">
<div class="container-fluid">
<div class="row">
<div class="col-md-2 col-sm-12 col-xs-12 col-lg-2">
<div class="boldgrid-component-logo boldgrid-shortcode" data-imhwpb-draggable="true" style="margin: 15px 0px;">
[boldgrid_component type="wp_boldgrid_component_logo" opts="%7B%22widget-boldgrid_component_logo%5B%5D%5Bbgc_logo_switch%5D%22%3A%22site_logo%22%2C%22crio_premium_update_site_logo_nonce%22%3A%22bb1136c255%22%2C%22_wp_http_referer%22%3A%22%2Fwp-admin%2Fadmin-ajax.php%22%2C%22crio-premium-site-logo-preview%22%3A%22368%22%2C%22widget-boldgrid_component_logo%5B%5D%5Bbgc_
@SitesByYogi
SitesByYogi / payment-cash.php
Created May 27, 2022 16:20
Mark Cash Payment as Paid
add_action( 'woocommerce_thankyou', 'wc_auto_complete_paid_order' );
function wc_auto_complete_paid_order( $order_id ) {
if ( ! $order_id ) {
return;
}
$order = wc_get_order( $order_id );
if( $order->has_status('processing') ) {
@SitesByYogi
SitesByYogi / crioRemove-hyphens.css
Last active October 26, 2022 17:27
Remove Auto-Hyphens for headings and Sub Headings
.palette-primary .h1, .palette-primary .h2, .palette-primary .h3, .palette-primary .h4, .palette-primary .h5, .palette-primary .h6, .palette-primary h1, .palette-primary h2, .palette-primary h3, .palette-primary h4, .palette-primary h5, .palette-primary h6
{
word-wrap: normal;
hyphens: manual;
-webkit-hyphens: manual;
}
@SitesByYogi
SitesByYogi / top-message.php
Created July 24, 2022 00:01
Adds an admin notice to the top of page or post editor
// top message
add_action('all_admin_notices','top_message');
function top_message()
{
if(strpos($_SERVER['REQUEST_URI'],'post-new')>0 || strpos($_SERVER['REQUEST_URI'],'post.php')>0)
{
echo ("
<div style=' background:#d3d3d3; width:95%; font-weight:bold; border:2px solid #AAA;
@SitesByYogi
SitesByYogi / replace-word.php
Last active July 24, 2022 00:28
Replace terms and phrases
<?php
// Filter hook
add_filter('the_content',array('sby2_fix_wordpress','fix_spelling'));
class sby2_fix_wordpress
{
function fix_spelling($content)
{
@SitesByYogi
SitesByYogi / remove-admin-links.php
Last active July 24, 2022 02:31
Remove admin menu links based on user role