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
- Insert Multiple Post with Same Publish Button
- wp_insert_post generates endless posts
- Remove standard meta boxes from custom taxonomy
- Update CPT post meta with update_post_meta and cron job
- Custom meta box data array: foreach not working correctly?
- Undefined Variable – Custom Post Type Meta
- What’s the difference between same wp functions get_posts(); functions in different form?
- 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
- Dequeue scripts and styles only for specific custom post type
- Insert post metadata for all posts in CPT at once if metadata no existent
- Function to display custom post type on front page makes menu items dissapear
- Display custom post type from dynamic custom field
- custom post type not showing in menu
- Show the same Article Available in Other Categories
- how to delete all users and posts based on ‘user_meta’?
- Show category ID on custom post type
- Custom post type redirected to homepage – how to debug
- Populate dropdown from one custom post type inside another custom post type
- Meta Key Value in current-user-only loop
- How to customize a permalink (URL) structure?
- How to check if user meta field is empty in conditional else statement
- Custom Post Type with Templates using Meta Boxes?
- How to set YouTube video as featured image?
- Notice: Undefined index: error and understanding wordpress
- Can I list a custom post type within another custom post type in the admin area?
- Change custom post type slug from plugin options
- Custom Post Types. Are there any disadvantages/advantages in using a plugin to develop them?
- Get posts between custom dates
- How to implement a Google map store locator
- 301 redirect for converted post type
- Can’t edit custom post type
- redirecting improperly after updating custom taxonomy term when referring from CPT edit page
- Deleting Custom Posts & Meta Data on Uninstall
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- Post image in WordPress not appearing on home page
- How do I create an archive page as a including metadata?
- Set URL link to featured image of custom post type
- Child post with numeric only slug keeps redirecting to parent
- Change CPT archive title
- AJAX load more for different custom post type loops
- PHP variable not regenerating when publishing multiple posts at the same time
- changing meta value and meta key of price field
- Posting to a Custom Post Type from front end – user generated content
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- Update Post Meta for a logged in user
- Getting meta in editor plugin, and event triggering issue
- How to duplicate entire custom post type
- A better way to add a meta box to custom post types
- Restrict Access to Posts based on Custom User and Post Meta Data
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- Two Custom Post Types Many to Many Relationship
- Should wp_postmeta meta_key always be unique for a given post_id?
- WordPress wrapped added a span tag to every single p tag
- ACF field key/value to show on taxonomy list
- Re-registering a custom post type not working (not showing up)
- Display featured image from one CPT within another CPT query
- how can I register a post_meta field in an existing CPT and then call it again with get_post_custom()?
- get_post_meta returning no value in custom post type alert email
- Query taxonomy of taxonomy of custom post type
- Best way to style first post differently?
- How to make custom posts types display when published for the future
- redirect automatic page that serves custom posttype content
- post meta parameter in post custom-post-type endpoint with restapi
- How do I set all of a particular post meta to a value within the custom post type I’m in?
- How to rewrite url for any specific taxonomy?
- create a new page from a custom post type similar to an authors page
- CPT archive admin menu label
- Anon function and add_meta_box
- Update postmeta Parent when post_status child change
- Metabox not show in categories custom post type cmb2
- WordPress request fiter order by related post’s post_title
- Redirect custom post type category to other custom post type category
- Hide a widget inside a div on specific type of post
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Update database from Quick Edit according to Checkbox state of Custom Post Type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
- Dynamic Custom Fields
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Show Custom Post Type meta boxes only on Page Edit
- Cannot save CPT meta box
- Allow users to create posts without logging in?
- How to change permalink to include custom post type
- Custom filter function not working with Custom post type
- Configuring a meta query with multiple post types that have the same relationship on a single page