This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'pre_get_posts', 'quantum_custom_property_locations_query_order' ); | |
/** | |
* Display Taxonomy Property Locations Page in Ascending Alphabetical Order By Title | |
* | |
* @link https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts | |
* @param object $query pre_get_posts WP_Query. | |
* @return void | |
*/ | |
function quantum_custom_property_locations_query_order( $query ) { | |
if ( $query->is_tax( 'property_locations' ) && $query->is_main_query() ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Removes 'Archive:' from title if taxonomy is 'property_locations' | |
* Used as H1 on Property Locations pages | |
*/ | |
add_filter( | |
'get_the_archive_title', | |
function ( $title ) { | |
if ( is_tax( 'property_locations' ) ) { | |
$title = single_cat_title( '', false ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'pre_get_posts', 'quantum_custom_property_archives' ); | |
/** | |
* For displaying 'properties' custom post type on the 'property_location' taxonomy pages | |
* '-1' means unlimited number of custom posts will be displayed | |
* change '-1' to '5' to limit the number shown to 5 for pagination views | |
* | |
* @link https://wpsites.net/web-design/customize-archive-pages-conditionally-using-pre-get-posts/ | |
* @param [type] $query Custom query. | |
* @return void | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'custom_tax_rewrite_rule', 10, 0 ); | |
/** | |
* Rewrites the Property Location's url to be '/$slug/' | |
* Example: | |
* http://quantum.test/index.php?property_locations=virginia rewrites to | |
* http://quantum.test/virginia/ | |
* | |
* @return void | |
*/ | |
function custom_tax_rewrite_rule() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'term_link', 'remove_tax_slug_link', 10, 3 ); | |
/** | |
* Used to remove or edit the taxonomy in the url for custom urls | |
* uses term_link filter | |
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/term_link | |
* | |
* @param [type] $link URL link. | |
* @param [type] $term Taxonomy term. | |
* @param [type] $taxonomy Taxonomy. | |
* @return string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! Flickity v2.1.2 | |
https://flickity.metafizzy.co | |
---------------------------------------------- */ | |
.flickity-enabled { | |
position: relative; | |
} | |
.flickity-enabled:focus { | |
outline: none; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add first | |
$wp_customize->get_setting( 'logo_icon' )->transport = 'postMessage'; | |
// Add 2nd | |
/** | |
* Add a control to upload the Footer Logo. | |
* Add a setting for the site Footer Logo. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Add this to functions.php acf options page | |
acf_add_options_sub_page( | |
array( | |
'page_title' => 'Contact Information', | |
'menu_title' => 'Contact Info', | |
'menu_slug' => 'contact-information', | |
'post_id' => 'contact-information', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Global Site Information | |
*/ | |
if ( function_exists( 'acf_add_options_page' ) ) { | |
acf_add_options_page( | |
array( | |
'page_title' => 'Global Website Information', | |
'menu_title' => 'Site Global Info', |