Assign post category to a page by selecting category from page dashboard

add this code into functions.php and a taxonomy box will be created for page from where user can make categories for page. <?php add_action( ‘init’, ‘create_book_tax’ ); function create_book_tax() { register_taxonomy( ‘genre’, ‘page’, array( ‘label’ => __( ‘Genre’ ), ‘rewrite’ => array( ‘slug’ => ‘genre’ ), ‘hierarchical’ => true, ) ); } ?>

list child-pages as normal pages?

you can use get_pages() function, something like this: $mypages = get_pages(); echo ‘<ul>’; foreach($mypages as $page){ echo ‘<li class=”page_item page-item-‘.$page->ID.'”><a href=”‘.get_page_link($page->ID).'”>’.$page->post_title.'</a></li>’; } echo ‘</ul>’;

Make a single page in WordPress available only for Admin and Subscribers

please try this if ( have_posts() ) : while ( have_posts() ) : the_post(); if ( get_post_status (get_the_id()) == ‘private’ ) { if ( current_user_can( ‘administrator’ ) ) { the_title(); the_content(); } else if ( current_user_can( ‘subscriber’ ) ) { the_title(); the_content(); } else { echo ‘this post is private’; } } else { the_title(); … Read more

How can you wrap add_filter with a if is_home() statement?

The is_home() function isn’t available until the parse_query action. So you’d probably want to rewrite your code like so: if ( ! function_exists( ‘df_excerpt_more’ ) ) { function df_excerpt_more( $more ) { return ‘ &hellip; <a class=”more-link” href=”‘ . esc_url( get_permalink( get_the_ID() ) ) . ‘”>’ . esc_attr__( ‘Read More’, ‘applique’ ) . ‘<i class=”ion-ios-arrow-thin-right”></i></a>’; … Read more