Tag Info

Hot answers tagged

3

What you need to use here is the WP_Comment_Query() function. So on the author.php page, you can easily get the author info and ID as followed: // get author info $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); // set ID $user_id = $curauth->ID; Then we add the user ID in the query ...


2

Like this: function custom_js_to_head() { ?> <script> jQuery(function(){ jQuery("body.post-type-YOUR-CUSTOM-POST-TYPE .wrap h1").append('<a href="index.php?param=your-action" class="page-title-action">Import from ...</a>'); }); </script> <?php } add_action('admin_head', 'custom_js_to_head'); ...


1

It appears to be because I was using the Advanced Custom Fields plugin, which has a seperate taxonomy option that was overriding the standard.


1

The MathML tags are removed by the editor. TinyMCE (the editor) removes tags that are not in its "valid_elements" list. The MathML tags and tag-attributes must be added via the "extended_valid_elements" list (seen below). Place the below code in your functions.php file. function mce4_options($opt){ $opt['extended_valid_elements'] = ...


1

The register_post_type() function takes a post type name as argument for map_meta_cap, where the default is post. Take a look at the internals of get_post_type_capabilities() for extended insights. That should help you to understand how it's meant to be: function get_post_type_capabilities( $args ) { if ( ! is_array( $args->capability_type ) ) ...


1

First method, you are missing the second parameter for get_the_author_meta, which is the ID of the author. Second method, you are using undefined variables.. Check this code, should get you what you want. // Method 1 <ul class="authpcom"> <?php $queried_object = get_queried_object(); $author_email = get_the_author_meta( ...


1

I learned from the comments by @Pieter Goosen and @Ignat.B, and @Pieter Goosen's answer here, that I need to register the taxonomy on plugin activation, and insert the term. Then I need to hook the taxonomy registration code to the init action hook as suggested by the codex. This will ensure that when I insert the term on plugin activation, I have the ...


1

You're setting the HTML of the second drop down to essentially blank with: $('select[name="second_dropwdown"]').html("<option>Sorry, no options</option>"); So when you enable it again, that's the only option. Instead, you might try including that as an actual option within your select and then selecting it when disabling the second drop down. ...


1

You could try creating a custom post type for videos paired with a custom taxonomy that matches the personalities. Then you create the videos, categorize/tag them to the personality. Once they are tagged, create a template for the personality, write a custom WP_Query() that grabs your video posts filtered by the personality slug.



Only top voted, non community-wiki answers of a minimum length are eligible