Skip to content

Instantly share code, notes, and snippets.

View XavaDigital's full-sized avatar

David Baird XavaDigital

View GitHub Profile
@XavaDigital
XavaDigital / mylisting-change-logo-size.css
Created March 14, 2022 01:01
CSS - Change listing logo size
/*For desktop layout*/
.profile-name {
min-height: 80px;
padding-left: 90px;
}
.profile-avatar {
width: 80px;
height: 80px;
}
@XavaDigital
XavaDigital / mylisting-social.css
Created March 14, 2022 01:01
CSS - Listing Social Icons Color
/* Color Listing Social Icons */
.details-list.social-nav a .fa-facebook{
background-color: #3b5998;
color: white;
border-color: white;
}
.details-list.social-nav a .fa-twitter{
background-color: #4099ff;
color: white;
border-color: white;
@XavaDigital
XavaDigital / listing-contact-form.php
Last active March 14, 2022 01:06
HOWTO - Listing Contact Form with Elementor
<?php
/*
* [contact-form-email]
* Retrieve listing contact email for use in custom elementor contact form
* If listing contact email is not present, the form will send to the listing owner
*/
function contact_form_email_func( $atts ){
$postID = get_the_ID();
$job_email = get_post_meta($postID, '_job_email')[0];
if(!$job_email){
@XavaDigital
XavaDigital / viral-ac.php
Created March 14, 2022 00:57
ViralLoops to ActiveCampaign
<?php
//
// Integration for Viral Loops to ActiveCampaign
//
// Avoids use of 3rd parties such as Zapier
//
/* On Viral Loops, create a JS integration using the following code
(function($){
$.ajax({
@XavaDigital
XavaDigital / mylisting-filter-past-events.php
Last active March 14, 2022 01:06
MyListing - Hide past events on Explore and Listing Feed widgets
<?php
//NB: Past events still show in explore cat count, and Listing Feed widget (unless using the 'Explore page query URL' setting)
add_filter( 'get_job_listings_query_args', function( $args ) {
$args['meta_query'][] = [
'relation' => 'OR',
array(
'key' => '_case27_listing_type',
'value' => 'events',
'compare' => '!=',
@XavaDigital
XavaDigital / mylisting-comment-notification.php
Last active March 14, 2022 01:05
WP - Change default new comment notification
<?php
/*
*
* Change the default text sent to post authors when review/comment submitted
*
*/
function rhq_comment_notification_text( $notify_message, $comment_id ){
// get the current comment and post data
$comment = get_comment( $comment_id );
$post = get_post( $comment->comment_post_ID );
@XavaDigital
XavaDigital / elementor-forms-mailchimp.php
Last active March 14, 2022 01:07
Elementor Forms MailChimp on acceptance - Add details to MailChimp list if acceptance checked
<?php
//Add code to functions.php
//Modify FORM-NAME, MC-API-KEY, MC-LIST-ID, field IDs in json_encode, and acceptance checkbox ID
add_action( 'elementor_pro/forms/new_record', function( $record, $handler ) {
//make sure its our form
$form_name = $record->get_form_settings( 'form_name' );
if ( 'FORM-NAME' !== $form_name ) {
return;
}