Skip to content

Instantly share code, notes, and snippets.

@jodzeee
jodzeee / gist:01ffb69417751f4c02bb1818409684d9
Last active April 25, 2024 00:40
Add frequently used links to main menu of Admin Bar
/** Add frequently used links to main menu of Admin Bar */
if ( ! function_exists( 'x_add_options_item_to_admin_bar' ) ) {
function x_add_options_item_to_admin_bar() {
global $wp_admin_bar;
$wp_admin_bar->add_menu(
array(
'parent' => 'site-name',
'id' => 'x_library',
'title' => __( 'Media Library', 'x' ),
@jodzeee
jodzeee / gist:3e1c6b975d28827435adc81e1c029cae
Created January 19, 2021 07:57
Beaver Builder HTML Module outputs custom fields for JMWH single listing
<p class="listing-details listing-content">[wpbb post:content]</p>
<div class="listing-details listing-community relationship-field-list"><span class="detail-label">Community:</span> [wpbb post:acf_relational type='post_object' name='community_relationship']</div>
<p class="listing-details listing-status">[wpbb post:terms_list taxonomy='status_tax' html_list='no' separator=', ' linked='no']</p>
<p class="listing-details listing-address">[wpbb post:acf type='text' name='property_location_address']<br />
[wpbb post:acf type='text' name='property_location_city'],
[wpbb post:acf type='text' name='property_location_state']
[wpbb post:acf type='text' name='property_location_zip']</p>
<p class="listing-details listing-price">[wpbb post:acf type='text' name='property_location_price']</p>
<p class="listing-details listing-size"><span class="detail-label">Square Feet:</span> [wpbb post:acf type='text' name='property_details_square_feet']</p>
<p class="listing-details listing-bedrooms"><span class="detail-label">Bedroo
@jodzeee
jodzeee / csscomb-prefs.txt
Last active October 12, 2016 22:03
CSSComb preferences
{
"config": {
"exclude": [
".git/**",
"node_modules/**"
],
"verbose": true,
"always-semicolon": true,
"block-indent": "\t",
@jodzeee
jodzeee / gfpc-cpt.php
Last active April 23, 2016 04:37
Add CPT (product) functionality to Genesis Featured Post Combo
add_filter( 'gfpc_query_args_gfpc-widget-13', 'gd_filter_home_blog_posts', 20, 2 );
function gd_filter_home_blog_posts( $args, $instance ) {
$args['post_type'] = array( 'page', 'product');
return $args;
}
@jodzeee
jodzeee / 0_reuse_code.js
Created September 24, 2015 17:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!—end #inner -->
<div id="footer-widgets" class="footer-widgets">
<div class="wrap">
<div class="footer-widgets-1 widget-area">
<div class="footer-widgets-2 widget-area">
<div class="footer-widgets-3 widget-area">
</div>
<!—end .wrap -->