You are registering user_profile_template
function to run during the page_template
filter hook, but your function is actually called registration_template
.
This is why your selected page might not be loading your custom template file. That’s one thing. Another is that with this method, the selected page will look completely different than all other page in the active theme. While you can mimic one theme’s HTML structure in your plugin’s custom template, this will not work in other themes. That’s assuming that your custom page template should look like it’s a part of the theme (with header and footer, at least). A workaround would be adding a filter to the_content
hook and printing your custom HTML before, after or instead of the original content. This way you are only concerned with your own markup and you’re letting the active theme to control the overall HTML structure.
Related Posts:
- Settings API with arrays example
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is get_option function cached?
- What are the advantages to the Settings API?
- Where to store plugin settings fields
- How to Use Checkbox in Custom Option Page Using The Setting API
- How should one implement add_settings_error on custom menu pages?
- Accessing plugin settings in gutenberg
- What’s the best method for emptying an option created with the Settings API?
- Which to use to execute code during the saving of a plugin settings page?
- Nonce in settings API with tabbed navigation
- How to use the settings API to set multidimensional arrays
- Add Admin Menu Inside Construct or Init
- Why won’t register_setting() create a setting?
- Settings API – Undefined Index when unchecking checkbox
- Disable $title in Plugin Options Screen?
- WordPress Settings API: saving multiple rows of similar data
- Why isn’t the Settings API designed to work for plugins using custom admin menus? [duplicate]
- Does settings API create settings on run time?
- Performance of several get_option() calls
- What is the use of get_option method
- Extend plugin options page
- Can I use the different settings sections over different pages using the save options group?
- Generating User(s) with Settings API
- Callback function is being called twice
- plugin development: storing language specific options
- How to add a secondary button to a settings page with a custom action?
- Correct way check nonce (security) using old Options API
- Tabbed navigation for plugin options using same row in database for all?
- Settings not set after calling register_setting()
- Using the Settings API, how should I add multiple values to an option?
- GET parameters interfere with my plugin settings
- Plugin settings not saving
- How to add settings subpage from a plugin to a settings page created in theme?
- Remove Internal Style Sheet if no Value Provided?
- WordPress setting with select – where is my mistake?
- null callback in add_settings_section
- Single sanitization callback for multiple fields
- Callback is not called in add_settings_field() when passed as part of an array, but recognises that it’s there. It’s passed Class to Class using OOP
- Custom delete option button in plugin settings
- When to use add_settings_section vs just register_setting?
- Adding settings link to plugin doesn’t work
- How to fix Uninitialized string offset: error on a checkbox in WP Settings API
- Plugin development: can’t update settings with multiple settings sections
- Updating Woocommerce Settings API when WordPress Settings API saved and vise versa
- The plugin does not save data
- Settings API with arrays example
- Prevent invalid or empty values from being saved to the database and retain the form field values upon error
- Allow users to add / remove settings in plugin
- Update problem with update_option() in combination with register_setting()
- Default settings aren’t used
- WordPress theme options Menu
- Category select options for plugin settings
- Issue on Checkbox with Custom Option Page
- Settings API: Setting default option via ‘get_option’ fails
- settings api – add_settings_section not working
- custom wp_editor does not save the content in plugin settings
- Multiple page plugin settings
- Plugin settings are saving but the fields
- Update plugin settings option_name for big plugin update
- Pause plugin option page until all data manipulation is complete
- It is possible to pass $args that sent by add_settings_field() inside another function?
- Settings API not saving
- Sanitization and validation input fields – Settings API
- Hide / show settings field based on other field’s value
- Integrating colorpicker into array field
- Plugin setting page – update_option problem
- How Can I Update wp_enqueue_scripts () From WordPress Option Page Radio Buttons
- add_settings_error on validating plugin options API
- add_option_{$option} action hook not being called
- Plugin options page: grouping checkboxes
- From my Plugin Settings Page use check boxes to load specific css files (e.g. Bootstrap / Foundation)
- When using an options array the Settings API isn’t creating the database record
- Dropdown pages in Settings API
- Generate activation url
- How do I build a settings panel under the plugin
- Settings API with arrays example
- Plugin settings checkbox
- Add_menu_page and saving settings
- Updating Style From WP Options Setting Page
- Combo/Drop down box on plugin settings page that allows additional options to be added
- Options don’t save, validation callback not executed
- How to delete all the options in an option group
- WordPress Plugin default option
- Update custom settings field in plugin
- Settings API not Saving to Database or Display
- Admin Message after Plugin Option Updated
- How to use register_setting()
- How to create an API for my plugin?
- Plugins in symlinked directories?
- How to use is_multisite() in a must-use-plugin?
- Modify a Free Plugin available on wordpress.org & include with my Premium Theme? [closed]
- PHP – Extend WordPress Woocommerce Revenue Analytics with custom field
- Amending REST API function without deactivate/activate plugin every time changes is made
- wp_localize_script is not adding a global variable for javascript
- WordPress plugin cron working only if admin is logged in
- Redirect User to custom URL after registering
- Adding a dropdown on the user admin
- How to show content in the body with my plugin (only in frontend not backend)?
- Adding Third Post Box Column: postbox-container-3