Like mmm said, user_register()
is not for displaying additional content, but for hooking into the internal user creation flow.
What you will need to do is to hook into user_register()
to store a short-lived transient marking that the user has registered. Then, add your modal code to the wp_footer()
output, wrapped in a test for the transient you just set to see if a new user has been created (not forgetting to delete the transient immediately afterwards).
Hope that helps
Related Posts:
- How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?
- Relative path instead of absolute for wp_enqueue_script
- How to integrate my HTML and javascript into my child theme
- enqueing Javascript and CSS
- Bootstrap 4 Optimization
- Could the WP script/style loader be used to concatenate and gzip scripts and styles in the front-end?
- wp_enqueue_scripts, wp_register_scripts, wp_print_scripts: i’m confused
- Use wp_enqueue_scripts, not wp_print_styles?
- Custom Admin CSS styles to style media uploader?
- Write text below a specific part of a sentence
- How to create fa-bars animated menu
- Child theme stylesheet not always overriding “index”
- How can I get the search form to be selected automatically?
- Cannot set property ‘className’ of null at setThemeFromCookie
- Custom Plugin – CSS works, JS doesn’t
- How can I force Dynamic CSS via ACF values to update on page load?
- functions.php – inject inline css from file
- How to Add a Read-only Textbox With Text in it That Has a Button to Copy it?
- Load custom CSS before admin CSS
- Theme JS is available but theme CSS isn’t
- Including CSS files in HEAD based on page content
- prevent HTML output if custom field is empty [closed]
- Hide Tab Titles from Tabs Block
- Dequeue styles with query doesn’t work
- Unable to use Datepicker in a table when inserting a row
- Bootstrap Integtration
- Enqueue CSS and Script only if needeed
- How would I add this code to a single WordPress page?
- Trouble with adding preloader to my home page index.html and index.js
- Import HTML code that loads css and javascript into specific page
- Interactive maps in wordpress
- Can I upload my HTML/CSS/Javascript game onto a WordPress page?
- plugin not loading my css and js
- difference between code for admin, user facing (css, js)
- Identify and style the paragraph beginning w/o a class: based on a combination of common characters (CSS, JS)
- Load CSS in footer, like your can with JS?
- Title has word broken when viewed in mobile [closed]
- Why is this jquery / java script code not working in mobile / in devices?
- Seperate functions.php for part of site
- wordpress css file
- Is the wp_enqueue method efficient?
- Enqueuing a script before anything else
- how to hide submenus for the not active pages
- Implementing a simple slider in code?
- Google yolo one tab signup plugin avilable in wordpress? [closed]
- CSS – Initial HTML Margin Issue On WordPress Site
- Add Codepen animation as Preloader to WordPress
- Disable File Editing function
- Some Text of website page on Iphone Safari become invisible
- Why is JavaScript being added to header as application/oembed?
- Child Theme CSS not showing at all
- Adding a Calculator to a WordPress Page
- Get post format and use it as a CSS class in different spans
- Is it safe to use WordPress generated classes?
- Faster fonts on mobile
- wp_enqueue_scripts and CSS
- HTML email sent with wp_mail shows plain text
- Ordering stylesheet above using functions.php
- Display Something in the Header After All Styles are Loaded
- custom header navigation has odd spacing [closed]
- How to change “““ to “““?
- Do I just put the html in a page when enqueueng or do I also have to reference js file from the html page [closed]
- My CSS suddenly doesn’t load anymore [closed]
- Conditionally enqueue a stylesheet based off of a javascript click event
- get_template_directory_uri() generates wrong path
- How to change the settings of a video? [closed]
- Append style tag in head while shortcode runs
- How can I move my custom css to the very bottom of the head section?
- Remove CSS & JS from
- Simple way to add custom class and ids to individual Gutenberg blocks
- CSS getting injected into index from somewhere after theme/custom CSS is loaded, overriding all of my CSS [closed]
- Acessing HTML element with no specific tag on it [closed]
- Custom CSS is not working?
- Responsive issue with secondary logo – not sticking in position [closed]
- How would one set or override a Fallback font for characters in second language?
- Earlier stylesheet not overriding later one
- First element/selector of enqueued CSS file breaks
- I want to set global directory locations for my CSS and JS locations. How?
- ACF Pro with SlickJS [closed]
- Link to page with posts of specific type
- how to stop the shaking effect on my homepage [closed]
- Show/Hide Div for Login Mask
- Including Styles and JS files to work ON my plugin interface
- How to avoid repeating similar properties for all tds of a table in a wordpress post
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- How to add class to an html output element in tinyMCE paragraph drop down menu
- is there a way to get all queued scripts/styles into a template without `get_header()`?
- WordPress is not displaying CSS file
- Change class names dynamically added to html elements by wordpress
- Plugins not showing up for custom template
- Equal height sections in custom Headway Theme
- W3TotalCache and Javascript — what should go where, when?
- How would I create the same popup in css and javascript as the one in contact button on the site https://www.sublimotionibiza.com/es/main.html [closed]
- Combine CSS Files without plugin
- I have html form and need to make it work in text editor on template. Only problem is it has .sccs styling file
- Dynamically add Js
- Button doesn’t work in the profile panel
- WordPress Rest Api access the header and extract stylesheets URL
- Invert porfolio item order
- How to make a function to play only on the home page?