Add Categories To Custom Post

Assuming that your post type is registered as albums, you can add a custom taxonomy to the post type as follows: add_action( ‘init’, ‘create_album_taxonomy’ ); function create_album_taxonomy() { register_taxonomy( ‘albumtype’, ‘albums’, // content type here array( ‘label’ => __( ‘Album Type’ ), ‘rewrite’ => array( ‘slug’ => ‘albumtype’ ), ‘hierarchical’ => true, ) ); } … Read more

How to mark posts as visited

You can add a special custom field when a logged user visits any page. A way to do this without editing the template file, is to use the filter the_content add_filter(‘the_content’, ‘wpse_259159’); function wpse_259159($content){ // check the user ID $current_user = wp_get_current_user(); if ( 0 == $current_user->ID ) { // Not logged in. } else … Read more

How to show view all posts from front page?

It’s partially depends upon your themes functions or plugin like Visual Composer. On the other hand, there is some plugins – Display Posts or Yearly Archive, which can display all the posts. or Create a custom page template and include the following code <?php // the query $wpb_all_query = new WP_Query(array(‘post_type’=>’post’, ‘post_status’=>’publish’, ‘posts_per_page’=>-1)); ?> <?php … Read more

Post that populates itself (almost) automatically using data from imported excel file

Sounds like a single “book” post type would be most appropriate. You could then add custom postmeta, which does not require Advanced Custom Fields. I would create the post type and custom fields first, test them out to make sure they’re saving appropriately to the database. Then, you can do a foreach loop for each … Read more