Location Inline Address

$contact_name = get_field(‘ph_tc_contact_name’); $contact_title = get_field(‘ph_tc_contact_title’); $phone = get_field(‘ph_tc_phone’); $phone_ext = get_field(‘ph_tc_phone_ext’); $fax = get_field(‘ph_tc_fax’); $phone_2_title = get_field(‘ph_tc_misc_contact_title’); $phone_2 = get_field(‘ph_tc_misc_contact_number’); $building = get_field(‘ph_tc_building’); $add_1 = get_field(‘ph_tc_address_1’); $add_2 = get_field(‘ph_tc_address_2’); $city = get_field(‘ph_tc_city’); $state = get_field(‘ph_tc_state’)->slug; $zip = get_field(‘ph_tc_zip’); $gmaps_link…Continue reading

Location Sticky Menu

$loc_services = get_field(‘service_location_relationship’); $loc_downloads = get_field(‘ph_tc_downloads’); $loc_relationship = get_field(‘ph_tc_location-gallery’); echo ‘ ‘; echo ‘INFO ’; if( $loc_services ) { echo ‘SERVICES ’; } if( $loc_downloads ) { echo ‘DOWNLOADS ’; } if( $loc_relationship ) { echo ‘PHOTOS ’; } echo ‘CONTACT‘; echo ‘ ‘;…Continue reading

Downloads List

$docs = get_field(‘ph_tc_downloads’); if( $docs ) { foreach( $docs as $doc_link ) { $docfile_name = $doc_link[‘ph_dl_name’]; $docfile_link = $doc_link[‘ph_dl_document’]; $dl_button = ‘[fusion_button link=”‘; $dl_button .= $docfile_link; $dl_button .= ‘” title=”” target=”_blank” link_attributes=”” alignment_medium=”” alignment_small=”” alignment=”” modal=”” hide_on_mobile=”small-visibility,medium-visibility,large-visibility” sticky_display=”normal,sticky” class=”download-btn” id=””…Continue reading

Untitled Snippet

add_action( ‘plugins_loaded’, ‘ht_force_header_for_site_search_spam’ ); /** * Targets common search spam queries and sets a 410 Gone header * to get them out of Google Search Console. * * @since 1.0.0 */ function ht_force_header_for_site_search_spam() { // If we can’t find the…Continue reading

redirect_non_access_users_to_donation_page

function redirect_non_access_users_to_donation_page() { // Check if we are on a singular page and it’s not the admin area if (!is_admin() && is_singular()) { global $post; // Check if the current user has access to the post if (function_exists(‘pmpro_has_membership_access’)) { $has_access…Continue reading

pmpro_admin_access_override administrator have access to every page

function pmpro_admin_access_override($hasaccess, $post, $user, $levels) { // Check if the current user has the ‘administrator’ role if (current_user_can(‘administrator’)) { // Grant access return true; } // Return the original access decision for non-admins return $hasaccess; } add_filter(‘pmpro_has_membership_access_filter’, ‘pmpro_admin_access_override’, 10, 4);Continue reading