In your code there’s this part:
test();
ob_start();
wp_list_categories($atts);
$output = ob_get_contents();
But I really doubt that global function called test
exists on your page.
There is a function called test
in your class, but it’s not static (so you can’t call it from static context unless you change it to static function test(){...}
), and you should call it with self::test();
Related Posts:
- How to detect WP plugins used on a site
- Using WordPress as a CMS: Developer preferences for custom vs existing plugins
- Login with OpenID, similar to Stack Exchange sites?
- Preserve custom URL parameter on more pages
- Does WordPress contain “default” anti-SQL injection code that responds with a 404 error?
- WordPress Capabilities: edit_user vs edit_users
- Passing .pem and .key files in cURL doesn’t work in WordPress
- Is there a limit on the size of a WP page?
- How to restrict Front-End Editor on a page?
- How do I create a custom wordpress slideshow plugin?
- Advanced custom field plugin not showing in admin sidebar
- How to remove action from plugin?
- Sidebar Generator issue [closed]
- Force plugin to fail activation
- Is there a plugin to help with translation of other plugins? [closed]
- How to load default scripts included with WordPress correctly?
- Skip file when plugin updated
- Are contributed plugin translations automatically installed in WordPress?
- Why would WP-CLI and WP Admin show different list of plugins with updates?
- Can I use a Shortcode output as an HTML attribute value?
- Use WordPress with a custom OAuth2 provider
- Translating plugin inside the theme [closed]
- Is license need for free wordpress plugin
- How to send little data between admin pages of my plugin?
- How to activate plugins for my WordPress sites from a remote server
- Register script in one plugin, and enqueue it in another
- how to load the language file in plugin?
- Getting a List of Categories for Use in a Plugin?
- UnWanted Custom field added in the wp page edit area
- Add a captcha form to the woocommerce register form
- WordPress multiple pages on one page via button switching
- How to get all of the activate_plugin action parameters?
- Redirect already logged in users away from a page to a specific page base on user role
- What can be reason for no plugin-strings available under stable section on translate.wordpress.org?
- WP_Terms_List_Table Quick Edit not working
- External Script Using WP – Hooks / Actions Not Working?
- How to add FB like + share AND also other Social Buttons on ALL pages and posts?
- file-gallery plugin line 1573 broken in 4.2 upgrade [closed]
- How do I use wp_editor() in widget form?
- PHP Error When a plugin is active
- Errors when trying to use a plugin to write to the database
- _prime_post_caches in wordpress
- Completely disabling password reset/recovery
- How to load different homepage on Mobile.?
- WordPress REST API Plugin Development – Add Custom Endpoint
- how to prevent all css and javascripts files from loading
- Best way to count visitors?
- WPTouch – how to remove shortcodes or make shortcodes function
- Adding class to last list item? Not WP generated
- Trying to add a page template for my custom post type from a plugin, but it will not display in the template dropdown unless file is in theme
- Custom shortcode for displaying user based on a role parameter
- How do I set up XAMPP to allow me to download plugins and themes?
- WP-API Custom Post Type json_no_route
- Cannot access WP admin because plugin returns 204
- My widget won’t update its values when save is clicked
- Install old version of plugin from admin panel?
- insert an html tag using php plugin
- Extend a plugin to include a widget option
- Can we give Pending as a Role to wp_insert_user?
- Is the Block Bad Queries Plugin Still Relevant?
- Rename Smart YouTube’s httpv back to http for all posts
- Table of contents (TOC) plugin is not showing header tag
- Is it possible to restore a deleted WordPress plugin I deleted from WordPress admin menu?
- Custom page from wp admin area
- Unexpected add action function in WP plugin
- I’m receiving the following error using the below code: Uncaught Error: Cannot use object of type WP_REST_Response as array
- how to display data from user panel using cmb2 metabox?
- How page with random php file with query params generated
- WooCommerce Product Table – filter query on attributes
- PDF Viewer Origin is Different
- WordPress Sumo Plugin not showing all images on clicking pinterest icon
- How to make cover image in post block expand to entire screen?
- Can you develop themes and plugins while using the hosting services BlueHost? [closed]
- Conditional Fields depending on checkboxes
- Identify if the_post hook is being called from the admin post list
- Translation plugin with default language?
- wordpress ajax pagination object value does not change
- Reorganization of namespaces
- Google analytic issue in wordpress
- Passing a parameter to filter and action functions
- image upload error wordpress
- Holding 2 wp_user in the same action (to update billing_email when user_email is updated)
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- OOP Plugin: Where should I place the action hooks in the class?
- How to get the real address from a url (permalink)
- 404 Page when emptying spam or deleting a plugin
- File permissions for wp-minify plugin
- How to make temporary expiring link for a downloadable file
- Add country flags
- How to declare this function correctly?
- Content expands beyond its column container [closed]
- Plugin version number after code rewrite [closed]
- WDTException: [0]: One or more columns doesn’t have a header
- How to Add Extra Text In WordPress Title Before Post Publish
- How can I make a quotation engine like this website in WooCommerce?
- Function not being called on form submit, only blank admin-post.php page
- WordPress Convert queries to slashes using function.php
- 404 Error on a WordPress Website, Error disappears for a while and again appears
- ShipStation WooCommerce Integration error
- Failed to update a post when I add a taxonomy to it