Technically, this code looks like it is accomplishing what you are trying to do, and I don’t see any glaring holes.
But, do you really intend on redirecting people away from your site when they just clicked to view someone’s bio? That sounds very confusing to the user and would result in a poor user experience, I think.
Regarding security, who is entering the data into the ecpt_website field? You or users? If users, I would definitely avoid that.
I assume these are offsite links, but if you are using internal links, you should use wp_safe_redirect()
instead which is meant for internal linking.
Related Posts:
- Detect meta value changes when post is updated (post_updated)
- Search everything (posts, pages, tags, cpt, meta)
- Custom Taxonomy Permalinks Redirection
- get_post_meta not working on publishing
- Redirect 404 page with ID in slug to associated page with same ID in slug
- Create short URL with auto 301 redirect
- redirect after submiting post for review
- Custom attachment function not working in v5.4.2?
- Stored meta from attachment, video length?
- Rich Custom Field for Custom Post type not saving
- Post AND page parameter for WP function
- How come Featured Image isn’t showing up in my Custom Post Type?
- Resolve a custom post type name vs. page permalink conflict (same slug)
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- clients list using wordpress
- Ordering posts having multiple post-meta date fields
- Find callback function for custom taxonomy metabox
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- How do I redirect all 404 errors of a specific post type to another URL?
- Append taxonomy terms as class names in markup?
- How to add multiple featured image in meta box in post editor?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- GravityForm: Populate Dropdown with custom post type [closed]
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- WooCommerce product search titles only
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Add custom column in custom post type edit page
- Insert Multiple Post with Same Publish Button
- Undefined Variable – Custom Post Type Meta
- I did group my search results by post type, but how can i give each of them its own order?
- Ordering posts in Search & taxonomy by post_meta
- custom post type not showing in menu
- Post image in WordPress not appearing on home page
- Change CPT archive title
- I need to add endpoint for wordpress categories
- Getting meta in editor plugin, and event triggering issue
- Restrict Access to Posts based on Custom User and Post Meta Data
- Featured image overlay when changing post status
- Metabox not show in categories custom post type cmb2
- Hide a widget inside a div on specific type of post
- Custom fields for custom post type
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- custom post for slider
- create custom meta box with default value
- Navigate posts with different post type that are in the same categories
- How to Echo Metadata Value in Currency Format
- Show Custom Message in WordPress Admin
- How exclude or skip post type with get_next_post_link
- Prevent A Specific Custom Post Type Showing In WP Search Results Page
- Is it possible to use array_walk() to append terms to an array of posts?
- WordPress notification if new post published
- get_post_meta returns NULL in front-end, but correct result in back-end
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Echo custom post meta from options array
- Value of post meta dropdown is not showing in WordPress
- Twitter Product Cards
- HM CMB: Post Select Field for CPT ID
- Excerpt length: get first paragraph
- Function to add custom HTML into head in custom post-type list page
- Problem Saving Custom Post Type Meta Values
- Need help with Custom Post Types and Taxonomies
- new post-type how do i retain the plugins on my sidebar?
- Custom Post Type Dashboard Tab not displaying any posts
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- Assigning categories to custom post types via a front-end form; only works for native post type
- Default excerpt for parent of a custom post type
- Move to trash custom post type post after ACF Date Picker date is older than today
- Get Previous Post based on Custom Field Name, for Custom Post Type
- Load custom post type with ID in a shortcode
- add action save post type and update post meta woocommerce
- get_post_meta not working with variable as a post_id for dynamically get the postid
- Redirect users in first login to a dynamic link
- Custom permalink rewrite rules – how do I fix this?
- Populate custom post type/custom fields from an external database
- How to sort custom post’s category by id from the theme’s function.php?
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- Stripe multiple transactions
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Edit is changing my custom’s post type parent id
- WordPress custom post type
- Edit post meta direct from post.php?
- Query custom post type and showing its content
- Redirect preview single post link to a page
- Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy
- Change the contents of a dropdown through the admin panel?
- fetch meta fields inside a widget
- Allow authors to create article image
- Custom post type – update_meta not working
- Use a Variable in update_post_meta as the $meta_key
- Comments are not working on Custom Post Type
- How to make a non-public post on wordpress approval?
- wordpress category form fields in popup
- Custom Post Type slug has the same Redirection entry