• Resolved sooraj@wp

    (@soorajwp)


    Hi, I’m using ‘Types’ plugin to add custom post types. I have added some custom fields also in them. Custom Post Type is ‘home-data’. I have added some posts under the post type home-data.

    Now when i click ‘view’ link in admin section it opens a page /home-data/test-1/ but it only shows the title.
    I’m passing the id of the post to a page like /home-details/?id=100
    How can i change the link in ‘view’ option (/home-data/test-1/) to /home-details/?id=100

    Also in the /home-details/?id=100 page the ‘edit page’ option in the admin bar goes to edit template page. How can i change that link to wp-admin/post.php?post=100&action=edit with the id so that i can edit that post itself.

    Kindly give some suggestions to fix it. thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter sooraj@wp

    (@soorajwp)

    I have fixed it!

    Use add_filter(‘post_row_actions’,’you_custom_function_name’,10,2); and your custom function in theme/functions.php for fixing ‘view’ links in admin section.

    Use add_action( ‘wp_before_admin_bar_render’, ‘your_admin_bar_function’ ); and your custom function in theme/functions.php for fixing ‘edit’ page links in admin bar.

Viewing 1 replies (of 1 total)
  • The topic ‘How to customize view and edit page options in custom post types’ is closed to new replies.