How to change number of items on add new pluggins page from backend?

You can filter the parameters for this view per install_plugins_table_api_args_search. See wp-admin/includes/class-wp-plugin-install-list-table.php for the details. You get an array as argument that looks like this: Array ( [page] => 1 [per_page] => 30 [fields] => Array ( [last_updated] => 1 [icons] => 1 [active_installs] => 1 ) [locale] => en_US [installed_plugins] => Array ( [0] … Read more

Exclude category from Tag Template

Have you tried using a normal loop in your tag template like this <?php while ( have_posts() ) : the_post() ?> //add content code or template <?php endwhile; ?> And then using the pre_get_posts filter like this function exclude_category( $query ) { if ( $query->is_tag() && $query->is_main_query() ) { $query->set( ‘cat’, ‘-433’ ); } } … Read more

Categories vs. Page Site Organization

You could create a customised ‘landing page’ using a template file? Creating category-internal.php with custom layout would display content at the /category/internal/ url. Here is some more info: https://codex.wordpress.org/Category_Templates http://www.wpbeginner.com/wp-themes/how-to-create-category-templates-in-wordpress/

category hierarchy level as a body class – parent cat =1, child cat=2, grandchild=3

You can achieve this by using the following custom code. You can use the code by adding it in the functions.php file of child theme or in the custom plugin file. add_filter( ‘body_class’, ‘custom_cat_archiev_class’ ); function custom_cat_archiev_class( $classes ) { if ( is_category() ) { $cat = get_queried_object(); $ancestors = get_ancestors( $cat->term_id, ‘category’, ‘taxonomy’ ); … Read more

How to link 2 categories (Sync)

Place this in your theme functions: function mysite_clone_post($post_id, $post, $update) { if(!$update && in_category(‘home cat’, $post)) { //not handled updates and will only run if in this category $post_fields = array( ‘post_author’, ‘post_date’, ‘post_date_gmt’, ‘post_content’, ‘post_content_filtered’, ‘post_title’, ‘post_excerpt’, ‘post_status’, ‘post_type’, ‘comment_status’, ‘ping_status’, ‘post_password’, ‘post_name’, ‘to_ping’, ‘pinged’, ‘post_modified’, ‘post_modified_gmt’, ‘post_parent’, ‘menu_order’, ‘post_mime_type’, ‘guid’, ‘tax_input’, ‘meta_input’); $postarr … Read more

conditional for sub category on archive page

You are looking for the cat_is_ancestor_of() function. https://codex.wordpress.org/Function_Reference/cat_is_ancestor_of The example in the WP codex is very close to what you are attempting for your archive template. <?php // if the category is music or a music SUBcategory, if (cat_is_ancestor_of( 4, $cat ) or is_category( 4 ) ): ?> <div id=”music_subnav_menu” class=”subnav_menu”> <?php wp_nav_menu( array( ‘menu’ … Read more

Display the featured image from the last post

This should work. I’ve modified your $args a little and surrounded your echoed code within the while(have_posts()) : the_post(); loop, then added the the_post_thumbnail() function and, finally, the wp_query_reset(); at the bottom: <?php $limit = 999; $counter = 0; $categories = get_categories(); foreach ( $categories as $category ): if ( $counter < $limit ) { … Read more