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
- Remove CSS class from element with JavaScript (no jQuery) [duplicate]
- What is the meaning of == $0 that is shown in inspect element of google chrome for the selected element [duplicate]
- How to completely remove borders from HTML table
- How to fix a footer overlapping content?
- What’s the HTML to have a horizontal space between two objects?
- HTML/CSS float: left; is not working properly
- Textarea Auto height
- How to get current screen width in CSS?
- margin-right is not working with my HTML. How can I center my content?
- How to place Text and an Image next to each other in HTML?
- Set bootstrap modal body height by percentage
- how to display a div triggered by onclick event
- JavaScript – Count Number of Visitor for Website
- Cannot read property ‘style’ of undefined — Uncaught Type Error
- How to make HTML element resizable using pure Javascript?
- Inbuilt style for jquery-ui-datepicker
- Why is style.css not being enqueued?
- Why I can’t add a CSS style in this WordPress theme?
- When enqueing a stylesheet, is it possible to remove the type attribute? [duplicate]
- Collapsible button inside a ul list does work in jsfiddle but not in WP
- Can “ and “ tags be used in the HTML editor?
- JavaScript added as link/stylesheet
- Eliminate render-blocking JavaScript and CSS in above-the-fold content
- how to setup content on a static frontpage with css and xhtml
- How do I make header.php use different css for different pages?
- What makes WP so SEO friendly?
- wordpress css file
- Is the wp_enqueue method efficient?
- how to hide submenus for the not active pages
- Implementing a simple slider in code?
- CSS – Initial HTML Margin Issue On WordPress Site
- Add Codepen animation as Preloader to WordPress
- Why is JavaScript being added to header as application/oembed?
- Adding a Calculator to a WordPress Page
- custom header navigation has odd spacing [closed]
- My CSS suddenly doesn’t load anymore [closed]
- Append style tag in head while shortcode runs
- How can I move my custom css to the very bottom of the head section?
- I want to set global directory locations for my CSS and JS locations. How?
- ACF Pro with SlickJS [closed]
- Show/Hide Div for Login Mask
- is there a way to get all queued scripts/styles into a template without `get_header()`?
- Plugins not showing up for custom template
- Dynamically add Js
- Invert porfolio item order
- How to make a function to play only on the home page?
- Advanced method to control cache of enqueued style/script
- Where to add this code for a Modal box to work? [closed]
- Overriding inline !important CSS with Javscript code snippet with media query
- Using Google Analytics in an enqueued JS file
- How to enqueue stylesheets in child-theme functions.php?
- Getting and setting CSS variables with JQuery in WordPress backend fails
- Add inline CSS to login page with wp_add_inline_style
- Getting click on item to open closest relevant element (popup) with jQuery
- Navigation menu disappears when I hover the mouse [closed]
- Hide CSS class only in single post pages
- Content going full width even though container is not
- Page flickers when new html5 video loads
- How to delay display of page elements until enqueued script has injected html
- Where to find the html for WordPress site? [closed]
- My contact form is not being responsive
- Pages in another language
- Add HTML input tag to to site navigation
- Outputting the blogposts or the_content()
- What can cause JavaScript and CSS files to be minified?
- How to add input search field with roudned corners?
- CSS Selector to override default theme.json custom properties in theme stylesheet