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
| global $post; | |
| $terms = get_the_terms( $post->ID, 'product_cat' ); | |
| foreach ($terms as $term) { | |
| $product_cat_id = $term->term_id; | |
| break; | |
| } |
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
| function primrose_child_add_remove(){ | |
| remove_action( 'woocommerce_before_shop_loop', 'primrose_woocommerce_subcategories', 10 ); | |
| add_action( 'woocommerce_before_shop_loop', 'primrose_child_woocommerce_subcategories', 10 ); | |
| } | |
| add_action('init','primrose_child_add_remove'); |
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
| /** | |
| * Extend WordPress search to include custom fields | |
| * | |
| * http://adambalee.com | |
| */ | |
| /** | |
| * Join posts and postmeta tables | |
| * | |
| * http://codex.wordpress.org/Plugin_API/Filter_Reference/posts_join |
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 | |
| // IN FUNCTIONS.PHP FILE CUSTOM LANGUAGE SWITCHER | |
| function language_selector_flags(){ | |
| $languages = icl_get_languages('skip_missing=0&orderby=code'); | |
| if(!empty($languages)){ | |
| echo '<ul class="menu language-menu">'; | |
| foreach($languages as $l){ | |
| if($l['active'] == 1){ $class = 'lang_sel_sel'; } | |
| elseif ($l['active'] == 0) { |
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
| function add_marker( $marker, map ) { | |
| // var | |
| var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') ); | |
| // create marker | |
| var marker = new google.maps.Marker({ | |
| position : latlng, | |
| map : map, | |
| icon: "http://de-vos.nl//wp-content/themes/devos/img/mapMarker.png" |
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
| //Get page title with ID | |
| $pageID = 26; | |
| $page = get_post($pageID); | |
| echo $page->post_title; | |
| echo $page->post_content; | |
| //Get page thumbnail with ID | |
| $thumb = wp_get_attachment_image_src( get_post_thumbnail_id('26'), 'post'); | |
| echo $thumb[0]; |
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 | |
| /** | |
| * Gravity Forms Bootstrap Styles | |
| * | |
| * Applies bootstrap classes to various common field types. | |
| * Requires Bootstrap to be in use by the theme. | |
| * | |
| * Using this function allows use of Gravity Forms default CSS | |
| * in conjuction with Bootstrap (benefit for fields types such as Address). | |
| * |