Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Redirect per shortcode if user is logged in

I believe you could use template_redirect to handle the redirect step:

function my_page_template_redirect() {
    if ( !is_page( 'overview' ) && is_user_logged_in() ) {
        wp_redirect( home_url( '/thinkingmachines/overview/' ) );
        die;
    }
}
add_action( 'template_redirect', 'my_page_template_redirect' );

Related Posts:

  1. Login form from shortcode doesn’t redirect after successful login
  2. Use another action instead of the shortcode API to display the last time a user logged in
  3. Modifying the wordpress login page and then referencing it with a shortcode problem
  4. Processing a login/register form before shortcodes are rendered?
  5. How to create a custom shortcode for custom login form?
  6. Set redirect for need login
  7. i want to show a modal when user lands on home page very first time
  8. Custom Login in Shortcode got error
  9. convert it into short code & explan how? [closed]
  10. Enqueue Scripts / Styles when shortcode is present
  11. Conditionally Loading JavaScript/CSS for Shortcodes
  12. What does extract( shortcode_atts( array( do?
  13. How can I redirect user after entering wrong password?
  14. How do I escape a ‘]’ in a short code?
  15. Pass boolean value in shortcode
  16. Show shortcode without executing it
  17. Shortcode always displaying at the top of the page
  18. Redirect function inside a Shortcode
  19. How to create a shortcode with 1 parameter (atts)
  20. how to show the syntax of a shortcode
  21. Custom shortcode being executed when saving page in wp-admin
  22. Change appearance of shortcode text inside editor
  23. current_shortcode() – detect currently used shortcode
  24. shortcodes output before content [duplicate]
  25. WordPress plugin shortcode not working
  26. How to add stylesheets only to pages with specific shortcode?
  27. Custom login form
  28. Using get_option() in JavaScript
  29. Shortcode empty attribute
  30. How does a shortcode work?
  31. Shortcode outputs at the top of the_content
  32. the_excerpt and shortcodes
  33. Using wp_editor in shortcode
  34. Remove wpautop from shortcode content / remove whitespace in buffering
  35. Prevent wp_login_form() from redirecting to wp-admin when there are errors
  36. Get current post id witout passing in shortcode
  37. Why are you using add_action for shortcode?
  38. How to get URL param to shortcode?
  39. How to add multiple buttons to TinyMCE?
  40. Adding “Remember Me” in custom login
  41. Check if post/page has gallery?
  42. Get first video from the post (both embed and video shortcodes)
  43. Get shortcode name from within it’s callback function? [duplicate]
  44. How do I change the language of only the login page?
  45. Disable WordPress 3.6 idle logout / login modal window / session expiration
  46. Wordspress add into my javascripts
  47. Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
  48. How do I create a Shortcode that returns text if domain is .com, not .co.uk
  49. Using preg_replace to separate gallery from the_content?
  50. Remove specific shortcode from get_the_content()
  51. How to display the site name in a WordPress page, or post
  52. Hide/show content starting in the middle of a paragraph
  53. Combining shortcode and get_template_part
  54. How can I put a wp_redirect into a shortcode?
  55. Escaping quotes from shortcode attributes
  56. Run visual composer code in php page
  57. short code output too early
  58. Shortcode in shortcode: How to append variable?
  59. Remove wptexturize from a shortcode?
  60. How can i put an array as variable in shortcode_atts?
  61. Autoembeds don’t work with paragraphs
  62. Avoid to load default WP styles in login screen
  63. Table of Contents with a shortcode
  64. Create custom [sourcecode] shortcode, the right way?
  65. How to fake a WordPress login?
  66. TED talks shortcode not working
  67. Allowing shortcodes inside attributes
  68. What is the best way to enable nested shortcodes?
  69. How build a custom login/register form with error handling?
  70. Can not login with correct username and password
  71. Tinymce – How to hook before or after live shortcodes rendering?
  72. Custom ReCaptcha Login
  73. How to customize a shortcode using the customizer
  74. Native “playlist” shortcode random playing… How?
  75. How to Output HTML tags in do_shortcode?
  76. List of all inbuilt WordPress shortcodes
  77. Nested Shortcode Detection
  78. Shortcode output always showing at top of page
  79. Organizing shortcodes. How to display all of them and their attributes?
  80. How to detect if a Shortcode is being called on a page?
  81. How to get current page title inside a page itself in a shortcode and in page content
  82. how to have the gallery shortcode output one single UL list instead of several DL?
  83. How can I add a custom script to footer of login page?
  84. Implement If-ElseIf-Else-EndIf with short codes
  85. Short code to display a loop
  86. Using shortcode in Post title
  87. using html as shortcode attribute
  88. shortcode outputs first before the page content [duplicate]
  89. Custom login form redirect to external site
  90. How to keep always logged in development environment
  91. How to add ‘class’ attribute into shortcode [audio]?
  92. Make shortcode work with nested double quotes
  93. Get all posts containing a shortcode
  94. How to display the names of users from a specific group with a shortcode?
  95. WordPress adds br in between my shortcode
  96. WordPress AJAX Login Screen
  97. Stray closing paragraph tag when using shortcodes
  98. How to display html in a shortcode
  99. Can I strip HTML tags in the “Compare Revisions” screen?
  100. I want to disable E-Mail verifcation / activation when a user signs up for my WordPress site
Categories shortcode Tags login, shortcode, wp-login-form
Warning in WordPress for Declaration of SplitMenuWalker::walk($elements, $max_depth) [duplicate]
Two content editors (gutenberg blocks) on the same page

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress