Basically what you would want is to disable the RPWE widget whenever a request is made through the API. I haven’t tested it, but this might work:
add_action ('widgets_init', 'wpse332374_remove_rpwe', 0, 1000) // make sure this is the last action
function wpse332374_remove_rpwe() {
if (is_rest()) unregister_widget ('recent_post_widget_extended'); // or whatever the handle is
}
Note that is_rest()
is not a standard WP function. It’s a solution proposed for another question about selective functionality for API calls.
Related Posts:
- Keep user’s privileges on accessing contents in JSON response
- CMB2 Repeatable Group & JSON API
- WordPress JSON API remove posts from a specific category
- How to use JSON data from URL into table on my wordpress website
- WordPress output data to another website and pull data
- API page return Header 500 but Work
- WP Rest API: details of latest post including featured media url in one request?
- I Want to Get A Plugin Version Number Dynamically
- Get a list of all WordPress.org Plugins?
- WP JSON REST API (Ryan McCue) how to query posts with specific meta data with ‘AND’ relation?
- [Plugin WPML] : How to create a translation of a post using the WPML API?
- Change Page’s Tag Using functions.php File
- How to build an API as a plugin
- Get Latest Plugin Version from WP API
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- How do I retrieve a list of popular plugins using the WordPress.org Plugin API?
- WordPress wp-json API – Custom Post Type returns 403
- Can’t use /wp-json/wp/v2/plugins API endpoint even as administrator
- Send Data to WordPress from kiosk
- Show the “ratingValue” and “ratingCount” values of KK Star Ratings Plugin
- Does the WordPress API have Modal Dialogs
- An Unexpected HTTP Error occurred during the API request
- REST-API: extend media-endpoint
- How to check if WordPress is updating plugins?
- Custom routing for plugins
- Advanced Integration – WordPress + YOURLS
- How to get all events from ‘All in one Events calender’ plugin in JSON format?
- Get Plugin Information from Multiple Sites Externally
- What is the best way to move a plugin´s subdirectory+files to wp-content/uploads-directory?
- Create or Update thousands of woocommerce products via PHP
- Looking for a solution – slightly convoluted problem
- Where to access the available plugin/WordPress updates?
- Best way to hook a custom url?
- How do I create a custom add media button modal?
- How to display the “ratingValue” and “ratingCount” values generated by the KK Star Ratings plugin into my page’s recipe ld+json schema
- How to modify WCMP Rest API response?
- wp_remote_get() returns 403 while file_get_contents() does not
- AJAX in plugin wp_send_json() sending html
- Limit post creation by role
- How to disable search as you type plugin suggestions?
- Set plugin-values when creating post via REST-API
- WordPress api call using wp-ajax returns error 400
- Plugin is a widget, but I want to call it in the head, can I?
- Socialite WP plugin, unable to obtain API keys from FB
- How to pass the API key to the client from the database? [closed]
- Create WordPress posts from JSON array using plugin in admin
- Adding inside wp-plugin jQuery script that receives JSON-formatted data, generated by php-function inside this plugin
- How to set category correctly for a custom post created by a remote API call?
- How to get theme’s info from wordpress.org/themes using api.wordpress.org?
- URL rewrite with external JSON query
- How to Include Fields in Query String When Making Request of WordPress.org Plugin API?
- Api external with wordpress
- How to get a list of all the available plugins names
- How can ι create my own (custom) WordPress table/list?
- Call Ajax URL in Plugin
- Can i use init hook for API purpose?
- How to convert Currency from USD to other IP Based currency in Php function
- How do I display PHP file contents on front end of WordPress?
- Upload Javascript and json webpage to wordpress
- Push Contact form 7 variable to front end after submission
- How to add a PW Gift Card to a Woocommerce Order request API?
- Escape commas in REST API
- In a plugin, How to update a json file using ajax
- Ability to change homepage on WordPress using API
- How to use third-party SendGrid Email Validation API in Gravity Forms?
- How to use Datatable with Ajax when creating plugin on WordPress?
- is it possible to fetch data from a remote api while admin is writing a new post?
- One time call to external API in widget
- CRUD from WordPress to Business Central 365 through OData REST API
- wp_remote_post To external API multiple values with the same key
- How to get data from a private API and add it to wordpress pages
- Create API for registering user on wordpress site with 3rd party site
- Different function call depending on shortcode?
- Plugin json page
- How to find out programmatically whether any cache plugin is installed in the WordPress website?
- How to use information from the database in the front-end?
- Mailpoet Sign up on Custom registration form won’t work
- wp rest api (v2) filter not working (404 error – rest_no_route)
- WordPress PHP error getting posts from another wordpress blog
- In the WordPress API is there a way to set the width of the post/page container
- Populate select option with JSON file
- what is the best way to create a premium plugin while also protecting your code
- WordPress, modular content, and syndication
- create web service for android app using wordpress website
- API Functions to Register and Show WordPress List Tables
- Convert HTML5/CSS3 site to WordPress Theme (need a lot of plugins) or just use the API?
- JSON Feed on my wordpress Blog
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- wordpress plugin JSON API search within specific category
- Output pure JSON wordpress
- How to add/manage Followers (email subscribers) via API?
- how to know that a wordpress plugin support using API?
- How can I send api calls from my plugin?
- Am having issues intergrating this api into my wordpress site, any help please?
- cURL External API request displays content above other content on page
- WP Donation Form with custom payment API
- Store large dataset in WordPress installation temporary
- How to write a plugin that “listens” every time, an edit occurs?
- Is it possible to create post in wordpress using postman?
- Stop the user if login from the cookies