Skip to content

Instantly share code, notes, and snippets.

@richsalvucci
richsalvucci / nav-search.php
Last active May 15, 2019 18:05
A gist for the nav search on Beaver Builder
<div class="fl-page-nav-search">
<a href="javascript:void(0);" class="fas fa-search"></a>
<form method="get" role="search" action="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr_x( 'Type and press Enter to search.', 'Search form mouse hover title.', 'fl-automator' ); ?>">
<input type="search" class="fl-search-input form-control" name="s" placeholder="<?php echo esc_attr_x( 'Search', 'Search form field placeholder text.', 'fl-automator' ); ?>" value="<?php echo get_search_query(); ?>" />
<a href="#search-close" aria-label="Close search dialog box">
<i class="fas fa-times"></i>
</a>
<script>
jQuery('a[href="#search-close"]').on('click', function(event) {
event.preventDefault();
@richsalvucci
richsalvucci / carousel.scss
Created December 20, 2018 02:27
SCSS sample
@richsalvucci
richsalvucci / single-day.php
Created October 5, 2018 14:42
Single Day events
<?php
/**
* Month View Single Day
* This file contains one day in the month grid
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/single-day.php
*
* @package TribeEventsCalendar
* @version 4.6.19
*
@richsalvucci
richsalvucci / single-rink.php
Last active August 9, 2018 15:25
PHP for Book King
<div id="rink-programsidebar" class="one-half column-last">
<div id="rink-todaysched">
<h2>Today's Schedule: </h2>
<?php
$customRSS = get_field('rss_feed_url');
$custRSSdecode = htmlspecialchars_decode($customRSS);
$ch = curl_init();
$timeout = 10;
curl_setopt($ch, CURLOPT_URL, $custRSSdecode);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@richsalvucci
richsalvucci / ee-code-added.php
Last active July 31, 2018 13:06
Event Espresso Cose Added
<?php
add_action( 'template_redirect', 'my_add_ee_calendar_assets' );
function my_add_ee_calendar_assets() {
// change is_page() parameter to match your calendar page slug
if ( class_exists( 'EED_Espresso_Calendar' ) && is_page('2567') ) {
global $is_espresso_calendar;
$is_espresso_calendar = TRUE;
add_action( 'wp_enqueue_scripts', array( EED_Espresso_Calendar::instance(), 'calendar_scripts' ) );
if ( EED_Espresso_Calendar::instance()->config()->tooltip->show ) {
add_filter('FHEE_load_qtip', '__return_true' );
@richsalvucci
richsalvucci / json error
Created January 25, 2018 19:27
json_error.json
<br />
<b>Notice</b>: Use of undefined constant wp_myplugin_property_title - assumed 'wp_myplugin_property_title' in <b>/nas/content/live/mysvn/wp-content/plugins/find-pages/find-pages.php</b> on line <b>126</b><br />
{"type":"info-box","nodeId":"5a6a2f25eab53","parentId":"5a68f8348822d","global":false,"layout":{"partial":true,"nodeId":"5a6a2f25eab53","nodeType":"module","oldNodeId":null,"html":"<div class=\"fl-module fl-module-info-box fl-node-5a6a2f25eab53\" data-node=\"5a6a2f25eab53\" data-parent=\"5a68f8348822d\" data-type=\"info-box\" data-name=\"Info Box\">\n\t<div class=\"fl-module-content fl-node-content\">\n\t\t<div class=\"uabb-module-content uabb-infobox infobox-left \">\n\t<div class=\"uabb-infobox-left-right-wrap\">\n\t<div class=\"uabb-infobox-content\">\n\t\t\t<div class='uabb-infobox-title-wrap'><h3 class=\"uabb-infobox-title\">Info Box<\/h3><\/div>\t\t\t<div class=\"uabb-infobox-text-wrap\">\n\t\t\t\t<div class=\"uabb-infobox-text uabb-text-editor\"><p>Enter description text here.<\/p>\n<\/d
@richsalvucci
richsalvucci / resource-loop.php
Created December 21, 2017 14:47
Archive loop
<?php
$resource = pods('resource', get_the_id());
$short_description = $resource -> display('short_description');
$item_reference_link = $resource -> display('item_reference_link');
$button_text = $resource -> display('button_text');
$button_icon = $resource -> display('button_icon');
$preview_image = $resource -> display('preview_image');
var_dump($button_icon);
@richsalvucci
richsalvucci / app.js
Last active November 13, 2017 19:23
React with WordPress Test
import React, { Component } from 'react';
import './App.css';
class App extends Component {
constructor() {
super();
this.state = {
movies: []
}
@richsalvucci
richsalvucci / $data_arrary.php
Created October 26, 2017 17:36
$data Array
Array([id] => 136212[gallery] => Array([136214] => Array([status] => active[src] => https://cclnewsite.staging.wpengine.com/wp-content/uploads/2017/07/107_CSTERN_CCL_Orleans_9918.jpg[title] => A love affair with Orleans-a Cape Cod Photo Essay, August 2017 Cape Cod LIFE | cclnewsite.staging.wpengine.com[link] => https://cclnewsite.staging.wpengine.com/wp-content/uploads/2017/07/107_CSTERN_CCL_Orleans_9918.jpg[alt] => A love affair with Orleans- a Cape Cod Photo Essay, August 2017 Cape Cod LIFE | cclnewsite.staging.wpengine.com[caption] => Agostino DiBari in his shop, Honey Candle. Photo by Charles Sternaimolo[thumb] => http://cclnewsite.staging.wpengine.com/wp-content/uploads/2017/07/107_CSTERN_CCL_Orleans_9918-150x100_c.jpg[mobile_thumb] => http://cclnewsite.staging.wpengine.com/wp-content/uploads/2017/07/107_CSTERN_CCL_Orleans_9918-150x100_c.jpg)[136215] => Array([status] => active[src] => https://cclnewsite.staging.wpengine.com/wp-content/uploads/2017/07/118_CSTERN_CCL_Orleans_9944.jpg[title] => A love affa