Created
August 9, 2016 08:01
-
-
Save dinhtungdu/153567ccb1095cca10f16b18b38e5258 to your computer and use it in GitHub Desktop.
This file contains 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
//framework-customizations/extensions/sidebars | |
function _filter_fw_ext_sidebars_add_conditional_tag($data) { | |
$data['is_archive_page_slug'] = array( | |
'order_option' => 2, // (optional: default is 1) position in the 'Others' lists in backend | |
'check_priority' => 'last', // (optional: default is last, can be changed to 'first') use it to change priority checking conditional tag | |
'name' => __('Shop Page', 'fw'), //conditional tag title | |
'conditional_tag' => array( | |
'callback' => 'is_post_type_archive', //existing callback | |
'params' => array('product') //parameters for callback | |
) | |
); | |
return $data; | |
} | |
add_filter('fw_ext_sidebars_conditional_tags', '_filter_fw_ext_sidebars_add_conditional_tag' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment