Support » Plugins » WordPress title permalink for custom post type

  • Hi all. I have a question. I register new post type and I want its title as permalink to single post’s page.

    Here is my code:

    register_post_type('video', array(
    			'label' => __('Videos'),
    			'singular_label' => __('video'),
    			'public' => true,
    			'show_ui' => true, // UI in admin panel
    			'capability_type' => 'post',
    			'hierarchical' => false,
    			'rewrite' => array("slug" => "video"), // Permalinks format
    			'supports' => array('title','author')

    And the permalink:

    <h1 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>

    I want it open like posts with post_type post. How to do it?

  • The topic ‘WordPress title permalink for custom post type’ is closed to new replies.