I would like to create a custom WordPress page from a plugin displaying content that is not from WordPress with 2 get parameters and apply rewriting rules on it. Let’s say I have a file called test.php. I would like with 2 get parameters to display content using the URL: example.com/param1/param2/ I’m good on the […]
I am trying to call a function to save changes from a submit button, but I am not accustomed to PHP programming, as I have just started. I tried Googling around a bit, but didn’t find anything too useful or applicable to my situation. At the bottom of my script, I have this function which […]
Can I add the archive and single page for a custom post type added by my plugin? I know it will only have to be a best guess with contents like: <?php get_header(); ?> <h2><?php _e(‘My Post Type’, ‘my-slug’); ?></h2> <?php //get posts and list ?> <?php get_footer(); ?> Which would mean it would need […]
I am working n plugin for iris color pick and in plugin I want to make my own color pallets and overwritten on iris color picker that use in theme. I create 6 fields in plugin where user can put their color hex codes and when user save them, then they overwritten automatically on pallets […]
Inside one of small custom plugins I really need to inlcude a file from another plugin, in order to be able to create and save obhect of a class that is declared there. What I have tried and the closest is this: include_once($plugin_url.’plugin-name/classes/event.php’); The error I get in the debug logs is the following: PHP […]
I’m currently building a pretty straightforward plugin, but it relies quite extensively on AJAX requests. I’m using the standard admin-ajax endpoint for the requests, but I find that it seems to be massively inconsistent, sometimes the request (for the same data) will take a few hundred milliseconds and then sometimes take a couple of seconds. […]
I’m trying to change the stylesheet for specific page/post while viewing in frontend, but I can’t find the hook or filter for doing that .. I’ve tried many hooks and pages and it doesn’t work Should I use page_css_class ? apply_filters( ‘page_css_class’, array $css_class, WP_Post $page, int $depth, array $args, int $current_page )
I have a series of pages which have images included on them by means of the HTML editor in the admin area. I need to access these while NOT on the the actual page in question, i.e, I need to access these images by the page ID. I’ve tried using the following: $all the images […]
I want to include a json manifest file in wordpress plugin but don’t know how, this is the file that i want to include in my plugin with rel=manifest and href=manifest.json <link rel=”manifest” href=”/manifest.json”> How to do this in plugin ?
I want to move some files of the plugin to the root directory of the website after plugin activation. How can I do this?