meta_key & meta_value not working with get_pages and custom taxonomy

Custom taxonomies are not meta values, but rather their own thing. I don’t think wp_list_pages() or get_pages() can query based on a taxonomy, so I’d recommend using WP_Query instead: <?php $relevant_pages_args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => -1, ‘post_parent’ => 65, ‘tax_query’ => array( array( ‘taxonomy’ => ‘relevance’, ‘field’ => ‘slug’, ‘terms’ => ‘alumni’ … Read more

Can I make WordPress use a custom template for a child page

You can filter template_include and replace the single-community.php with a single-child-community.php. Example add_filter( ‘template_include’, function( $template ) { if ( ! is_singular() ) return $template; // not single if ( ‘communities’ !== get_post_type() ) return $template; // wrong post type if ( 0 === get_post()->post_parent ) return $template; // not a child return locate_template( ‘single-child-community.php’ … Read more

Add theme templates for child categories into the template hierarchy

Don’t use template_redirect to load alternate templates as you can break any functionality that uses this hook to run on a lower priority than yours. The right hook is template_include. This is according to Mark Jaquith, one of the WP lead developers. https://markjaquith.wordpress.com/2014/02/19/template_redirect-is-not-for-loading-templates/ That said, it might be more appropriate to use the category_template filter … Read more

select a private page as parent for another private page

The following conditions is assumed to make it working Classic Editor is in use, since Gutenberg/Block Editor is rendered by Javascript, it requires another solutions and so far I am not sure if there is override option yet. For the code you have shown, it does not work because the number of arguments for add_filter() … Read more

Page as a child of a Custom Post Type

When you register the post type you can set hierarchical to true. hierarchical (boolean) (optional) Whether the post type is hierarchical (e.g. page). Allows Parent to be specified. The ‘supports’ parameter should contain ‘page-attributes’ to show the parent select box on the editor page. Default: false Note: this parameter was planned for Pages. Be careful, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)