register_activation_hook only fires when plugin is going to active.
You should use your function in add_action('admin_init','your_function_name').
Related Posts:
- Is there an action that is called when a post is restored from the trash?
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- Get content and send to 3rd party
- Globally register styles but enqueue them selectively
- submit posts by unregistered users in wordpress
- Calendar Solution: Handling upcoming Dates with Posts?
- Admin Panel pagination link styles
- Is this the right way to execute some PHP in my plugin after a button click on an options page?
- get_post_type on post.php
- Is there an easy way to flag posts in the admin area?
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- finding whether request is for post, and post id
- Display update notification messages like ‘What’s New’
- Any built-in function to associate a post to category through a plugin?
- How to hide some section in WordPress under Post
- Display post lists in 2nd paragraph
- Can’t delete Draft Post [closed]
- Matching Chapters to a Custom posts [closed]
- WordPress comments not appearing in blog posts, likely because of Redux template. Could I fix this with a plugin that adds a comment form as a block? [closed]
- WordPress display breadcrumbs using Yoast plugin [closed]
- Outbound link autometic converted into linkdirect , and not opening
- Display by Category in Admin
- Admin accounts unable to see plugins from external IP
- Preg Match All doesn’t Allow echo first character for WordPress Taxonomy Tags
- Two problems on my WordPress installation [closed]
- posts comments goes to trash
- Contributive page where people logged in can write
- Plugin dependencies: show notice like theme plugins dependencies
- Excerpts on category page
- WordPress wp-admin/network/plugin-install
- How to pull email and name from Flamingo plugin
- how to access all user dashboard on fronted page [closed]
- How to set add question capability for author role in wp pro quiz plugin
- Which widget to use for display category post with view more? [closed]
- External RSS feed to WordPress Portfolio
- Trying to fix form resubmition with PRG (Getting error: Cannot modify header information – headers already sent by)
- do_action() hook into load-(page)
- Display wordpress post’s in popup?
- How to change the name of the “edit my profile” link in the WordPress admin backend
- Unable to add TAB character to post?
- how to add text to posts from tags
- Sync User to cPanel webmail?
- Adding CSS to custom post type admin page causes error
- Add category selection to custom post type (plugin)
- Redirect to another page using contact form 7? [closed]
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- Would Gutenberg be considered a PlugIn?
- pagination on data fetched using SQL query
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- How to delete all trashed item in one-go
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- What’s causing this error? “Warning: Invalid argument”
- How to get the first post and second post in a wordpress blog?
- Is it possible to send blog posts via email to subscribers?
- Custom setup of wordpress comments that are displayed
- Is there any plugin which can paste a common content to my every post?
- Recent posts per category loop?
- ‘Organize Series Plugin’ as muti author feature
- Import Instagram post to WordPress blog post
- Problem of encoding characters (apostrophes) in my posts publications
- How to backup single post in wordpress [closed]
- Move plugin-settings to ‘Settings’-menu in the admin
- How to get all posts belongs to a user between a certain date
- WordPress Admin Menu defining function is seperate file
- How do I add some javascript validation to the admin interface form’s onsubmit?
- How do I publish portfolio items with a future date?
- remove all submenus from plugin
- wordpress content .php file in an iframe’s src in a wordpress post
- Create WordPress posts from JSON array using plugin in admin
- Plugin getting Cannot modify header information errors
- Making my plugin create a page?
- creating a plug in that would tap into save/update action of posts [closed]
- Is there a way to make the main page only display a brief description of the full article?
- How to change the post form from plugin?
- Simply poll & Events Calendar plugins clashing
- WordPress plugin Post Creation [closed]
- Don’t publish/update a post when a plugin finds errors in custom fields
- Allowing users to Sign-up > Login > Post articles that need approval
- How to see which sites use my installed plugins (wordpress multisite)
- How can I automatically download all images from all imported posts, place them on my new host, and replace all the links
- posts from multiple post types in one slider
- How to use the CSS of the WordPress core in the development of my administration page?
- How to display the featured post on the category page?
- Set Multiple Meta Values as an Array Using dispatch( ‘core/editor’ ).editPost() Call in Gutenberg/JS
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- Flickering sidebar when scrolling page [closed]
- Is there a plugin or a way in the wordpress that would let us have different versions of a post or page accessibe to users?
- WordPress permissions error with admin account
- Moving FB comments at the end of page
- Where Should i write the code for wordpress ajax voting?
- download button for audio file in post [closed]
- check uncategorized category by default
- Print posts category or tag as a formatted journal
- how to execute some code after a post is published in WordPress [duplicate]
- getting notifications about updates only in the “core” page
- Post status doesn’t update to ‘future’ every time?
- Remove value from array within post meta ajax admin