Jon Masterson
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Primary Category] Get primary category on single post?It’s saved as post meta. It can be retrieved with
get_post_meta( $post_id, 'epc_primary_' . $enter_your_taxonomy_slug_here, true );
and will kick back the primary term id (if it exists).Forum: Fixing WordPress
In reply to: Mediaelement scripts added to template by mysterious sourceI believe site #1 is just loading the audio embeds without reinstantiating the MediaElement. For AJAX-added audio embeds, you need to reinstantiate the MediaElement, and enqueue its styles. More here.
If you don’t want to use the MediaElement at all, you can remove it by adding this to your functions file:
wp_deregister_script('wp-mediaelement'); wp_deregister_style('wp-mediaelement');
- This reply was modified 7 years, 9 months ago by Jon Masterson.
Forum: Fixing WordPress
In reply to: wp-config file problemsRoot is not WordPress. She has two subdirectory installs, as she mentioned previously, and by “she,” I am meaning taramcnulty, not Tara from above (obviously). You should get that cough checked out. It’s gross.
Forum: Fixing WordPress
In reply to: wp-config file problemsHi Tara!
From the source code on your site, it looks like your permalinks have already been changed to root level. Start from step 4 under “Using a pre-existing subdirectory install” here, you should be AOK. You shouldn’t need those two lines in your config file…
Forum: Fixing WordPress
In reply to: Authorship issues with 3.8The problem was due to using get_posts() in a meta box on the edit page. The mystery is over, and the denouement of this story was rather boring. My apologies.
Forum: Fixing WordPress
In reply to: Authorship issues with 3.8No, sorting through theme/plugins now. Thanks!
Forum: Plugins
In reply to: [Plugin: MP6] Plugin Icons do not play niceSven’s post outlines basically the same approach I put on GitHub — except I use FontAwesome instead of IcoMoon/SVG. Sven has contributed to the GitHub resource I mentioned, adding dependency checks for MP6.
The number of icons you need and how you would like to load them is up to you — flat icon resources abound. I prefer the FontAwesome stack, as it is a great, free resource. I also prefer to load the whole icon stack, so if I need to add another icon down the road, I can simply A) choose one from FontAwesome’s cheatsheet and B) add it with two lines of CSS.
Hope this helps! Thanks!
Forum: Plugins
In reply to: [MP6] WooCommerce Custom post type iconHi Shiva,
This should remove the pin:
.icon16.icon-posts-shop_order:before, #adminmenu #toplevel_page_woocommerce div.wp-menu-image:before, .icon16.icon-posts-product:before, #adminmenu #menu-posts-product div.wp-menu-image:before { display: none; content: ''; }
You could also remove the menu image(s) that other plugins added, instead:
.wp-menu-image img { display: none; }
Furthermore, you could replace the plugin images with an iconfont, using the same css above combined with this little snippet I put together.
I hope this helps!
Forum: Plugins
In reply to: [MP6] Custom post type iconI believe adding this css to your admin will hide the pin…
.icon16.icon-posts-<<your-post-type-name>>:before, #adminmenu #menu-posts-<<your-post-type-name>> div.wp-menu-image:before { content: ''; display: none; }
You could also use an icon font for your CPT. I created a small resource for using FontAwesome with MP6 on Github.
Forum: Fixing WordPress
In reply to: is_tax() no longer working after upgrade to 3.5I actually found an error in my code. is_tax() works great! Sorry for any confusion!
Forum: Fixing WordPress
In reply to: is_tax() no longer working after upgrade to 3.5<?php if (is_tax('businesses', array('offices','the-offices','office-buildings'))) { _e( 'class="current-menu-item"'); } else { _e( ''); } ?>
This example is representative of all items in this menu. If we’re on the taxonomy archive pages for “offices”, “office-buildings”, or “offices” (which are all taxonomy terms in the “businesses” taxonomy), it should show me some love and insert the “current-menu-item” class onto this menu item.
Love is shown in 3.4.2, but 3.5 has no love for me. Yet. Thanks!
Forum: Themes and Templates
In reply to: Post Navigation – Hide last previous linkA workaround…
<div class="navigation"> <?php if ($wp_query->max_num_pages > $paged) : ?> <div class="prev"><?php next_posts_link('PREVIOUS', '1000' ); ?></div> <?php endif; ?> <div class="next"><?php previous_posts_link('NEWER', '1000' ); ?></div> </div>
Forum: Fixing WordPress
In reply to: Get Parent Category?I know this was a while ago, but here is what I came up with. It worked great for me. “$catParent” = parent category name
<?php $category = get_the_category(); $catParID = $category[0]->category_parent; $catParent = get_cat_name ($catParID); ?>