Custom post type split title, setup permalink accordingly

I have been working on this solution, I have come up with a different idea to implement this – I have added two different meta boxes, one with First Name, the other with Last Name Then I have hooked a function with save_post_{$post->post_type} hook like this – add_action( “save_post_{$post->post_type}”, “update_post_data” ); function update_post_data( $post_id ) … Read more

How do I get a link to a WP page within a loop?

So, it turns out that if you pass a Post or Page object to the_permalink() or get_page_link() it will override the post object set by the loop whereas passing an ID won’t. In the previous example you would use <?php echo get_page_link($mypage); ?> instead. Source of get_page_link() had the answers: https://developer.wordpress.org/reference/functions/get_page_link/

Not recognizing my custom templates in hierarchy

If you register a taxonomy named projects, and create taxonomy-projects.php, the URL mysite.com/projects will not exist. There is no such page in WordPress. If you create a term inside inside that taxonomy, “My Project”, that term will be accessible at mysite.com/projects/my-project and that URL will use taxonomy-projects.php to list all posts that belong to that … Read more