Show Taxonomies with admin area for custom post type?

As documented, you can set the show_admin_column argument of register_taxonomy() to true to do this: ‘show_admin_column’ (bool) Whether to display a column for the taxonomy on its post type listing screens. Default false. For example: register_taxonomy( ‘subject’, // The name of the taxonomy. Name should be in slug form (must not contain capital letters or … Read more

Functions php shortcode for displaying main menu with no child items

You could set the ‘depth’ argument to 1 in your wp_nav_menu() call to get only top level items, along with the custom menu walker, something like this: return wp_nav_menu( array( ‘menu’ => $name, ‘menu_class’ => ‘footer-menu’, ‘echo’ => false, ‘depth’ => 1, ‘walker’ => new custom_footer_menu_walker ) ); Add the custom menu walker to your … Read more

Data Validation in wordpress

Please see this Codex article for further guide, but in your case, you would use esc_attr() to escape the $second_col_class value which is being used in an HTML attribute, namely class: <!– bad –> <div class=”<?php echo $second_col_class; ?>”> <!– good –> <div class=”<?php echo esc_attr( $second_col_class ); ?>”> <!– good –> <div class=”<?php esc_attr_e( … Read more

I’m using wp residence theme and want to display titile above the slider [closed]

You just have to swap two of the template parts. You want to take <?php get_template_part(‘templates/property_cards_templates/property_card_title’); ?> line and move it above the template include line that adds the slider. I have no idea what this will do to your formatting but if you’re this deep into the template then you should be pretty comfortable … Read more

Moving post title down the page / Removing a block from a post

The solution is/was simple. Use a priority of 1 in the add_filter() function. function carousel_block_remover( $content ) { // Matches <!– wp:client/carousel {“id”:”100″} /–> $regex = ‘/<!– wp:client\/carousel {“id”:”(.*)”} \/–>/’; if ( preg_match( $regex, $content ) ) { // Filter the first block out of the_content $content = preg_replace( $regex, ”, $content, 1); } return … Read more