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 | |
| if(is_user_logged_in()){ | |
| $args = array( | |
| 'sort_order' => 'asc', | |
| 'sort_column' => 'post_title', | |
| 'post_type' => 'page', | |
| 'numberposts' => -1, | |
| 'post_status' => 'publish', | |
| 'suppress_filters' => 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
| <?php | |
| if(is_user_logged_in()){ | |
| $args = array( | |
| 'sort_order' => 'asc', | |
| 'sort_column' => 'post_title', | |
| 'post_type' => 'page', | |
| 'numberposts' => -1, | |
| 'post_status' => 'publish', | |
| 'suppress_filters' => 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
| foreach (array_chunk($users_kicks, 4, true) as $array) { | |
| echo '<div>'; | |
| foreach($array as $kicks) { | |
| echo $kicks->brand; | |
| } | |
| echo '</div>'; | |
| } |
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
| $tax = 'music'; | |
| $oterm = 'pop'; | |
| $term = get_term_by('slug', $oterm, $tax); | |
| $termChildren = get_term_children($term->term_id, $tax); | |
| $wp_query = new WP_Query(); | |
| $wp_query->query( | |
| array( | |
| 'posts_per_page' => '5', | |
| 'tax_query' => array( | |
| array( |
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 | |
| if(is_user_logged_in()){ | |
| $args = array( | |
| 'sort_order' => 'asc', | |
| 'sort_column' => 'post_title', | |
| 'post_type' => 'page', | |
| 'numberposts' => -1, | |
| 'post_status' => 'publish', | |
| 'suppress_filters' => 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
| <?php | |
| if(is_user_logged_in()){ | |
| $args = array( | |
| 'sort_order' => 'asc', | |
| 'sort_column' => 'post_title', | |
| 'post_type' => 'page', | |
| 'numberposts' => -1, | |
| 'post_status' => 'any', | |
| 'suppress_filters' => true | |
| ); |
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
| if(!function_exists('write_log')){ | |
| function write_log($log){ | |
| //if(true === WP_DEBUG){ | |
| $log_file_name = WP_CONTENT_DIR.'/logs/'.date('Y-m-d').'.log'; | |
| if(is_writable($log_file_name)){ | |
| if(is_array($log) || is_object($log)){ | |
| error_log(print_r($log, true)."\n", 3, $log_file_name); | |
| } else { | |
| error_log($log."\n", 3, $log_file_name); | |
| } |
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 | |
| $a = Array( | |
| 1 => Array( | |
| 'name' => 'Peter', | |
| 'age' => 17 | |
| ), | |
| 0 => Array( | |
| 'name' => 'Nina', | |
| 'age' => 21 | |
| ), |
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 | |
| $tag = get_queried_object(); | |
| echo $tag->slug | |
| ?> |
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
| // https://docs.appthemes.com/tutorials/allow-html-in-wordpress-category-taxonomy-descriptions/ | |
| // allow html in category and taxonomy descriptions | |
| remove_filter( 'pre_term_description', 'wp_filter_kses' ); | |
| remove_filter( 'pre_link_description', 'wp_filter_kses' ); | |
| remove_filter( 'pre_link_notes', 'wp_filter_kses' ); | |
| remove_filter( 'term_description', 'wp_kses_data' ); |
OlderNewer