Page doesn’t load
Page doesn’t load
Page doesn’t load
If you have followed the code of the recent page widget then what you are trying to achieve can’t be done as naively as you are trying to do it. Recent posts widget caching is based on the assumption that the same output is displayed everywhere which is why it can calculate the cache on … Read more
Drop this into the file that is displaying the date (assuming you are using get_the_date): $month = date( ‘F’ ); $categoryIds = array(); $bannedMonth=”September”; $bannedCategory = 13; $categoryArray = get_the_category(); foreach ( $categoryArray as $categoryObj ) { array_push( $categoryIds, $categoryObj->term_id ); } if ( $month != $bannedMonth && !in_array( $bannedCategory, $categoryIds ) ) { echo … Read more
solved it so: $part_brand = get_terms(‘brands’, ‘hide_empty=0′); <label for=”part_brand”>Бренд</label> <select name=”part_brand” id=’part_brand’> <option value=”” <?php **$brand_names = wp_get_object_terms($post->ID, ‘brands’);** if (!count($brand_names)) echo “selected”; ?>>None</option> <?php foreach($part_brand as $brand) { if (!is_wp_error($brand_names) && !empty($brand_names) && !strcmp($brand->slug, $brand_names[0]->slug)) echo “<option value=”” . $brand->slug . “” selected>” . $brand->name . “</option>\n”; else echo “<option value=”” . $brand->slug . … Read more
As said in my edit to my answer to your previous post, I have rewritten your complete shortcode to be a bit more useful, and I also removed the extract() function which is a bad function to use. To answer this question, I had to further modify your shortcode. To avoid clash with other excerpt … Read more
Input gets deleted/overwritten after changing to different Admin Menu
Well, I will try to answer my question myself. From what I’ve learnt there is no easy and gentle ways to exclude plugins on the fly. Each plugin,if you lucky, has uninstall.php witch executed upon when you click button “delete”. So if you harshly remove plugin it will leave traces in databases. Even if you … Read more
WordPress Development understanding core
if( !in_array(‘Aggregator’, get_the_author_meta(‘roles’)) ){ //If user is not aggrigator display the info } That will get the authors roles as an array for the current post. You can pass a post id along with the ‘roles’ to get the data from another post. Also note that your Aggrigator role is possibly set-up in word press … Read more
Ok, I reworked the whole thing because I was obviously printing out my info prior to where I should have. It now looks like this: //SHOW SCREEN IF OPTION CHECKED add_action( ‘admin_notices’, ‘sbah_show_current_screen’ ); function sbah_show_current_screen() { $screenoptions = get_option(‘sbah_options’); if(isset($screenoptions[‘sbah_view_screen’][0])) { $takenscreen = $screenoptions[‘sbah_view_screen’][0]; } if(isset($takenscreen)) { if( defined( ‘DOING_AJAX’ ) && DOING_AJAX ) … Read more