Michal Mau
Forum Replies Created
-
Forum: Plugins
In reply to: [Yoast SEO] [Plugin: WordPress SEO by Yoast] crashed my siteForum: Fixing WordPress
In reply to: Get the current category taxonomy term name?@dan I’m not sure I understood your Q but take a look at following functions and their respective examples and let me know if you need to know more.
wp_get_object_terms – Retrieves the terms associated with the given object(s), in the supplied taxonomies.
get_object_taxonomies – Returns all of the taxonomy names of a defined object type
Forum: Fixing WordPress
In reply to: Get the current category taxonomy term name?… or use a native WordPress function:
echo get_queried_object()->name;
??Forum: Fixing WordPress
In reply to: Get the current category taxonomy term name?Happy to help guys!
You can combine it into one-liner of course:
echo $wp_query->queried_object->name;
Forum: Fixing WordPress
In reply to: Get the current category taxonomy term name?I came up with this after inspecting the
$wp_query
object:$term = $wp_query->queried_object; echo '<h1>'.$term->name.'</h1>';
And it works great for me.
Hope it helps somebody.
Forum: Requests and Feedback
In reply to: Filter media library by file typeYou can add this piece of puzzle into your theme’s function.php file:
function modify_post_mime_types($post_mime_types) { $post_mime_types['application/pdf'] = array(__('PDF'), __('Manage PDF'), _n_noop('PDF <span class="count">(%s)</span>', 'PDF <span class="count">(%s)</span>')); return $post_mime_types; } add_filter('post_mime_types', 'modify_post_mime_types');
Works for me.
Forum: Plugins
In reply to: [Plugin: Custom Post Type UI] Bug in Custom Post Type UI with ThumbnailsI know that support for this meta box is already enabled in my theme, b/c I see it on my regular post add/edit screen.
For me simply enabling it with
add_theme_support( 'post-thumbnails');
,
(which should work for ALL post types) didn’t work, but making an array did:
add_theme_support( 'post-thumbnails', array( 'post', 'page', 'custom_post_name' ) );
Well, I’m not using the discussed plugin but I thought this could be helpful anyway.