Categories
CMS Mastering Development Wordpress

remove_filter that checks for pre orders [closed]

I’ve ready through 5 other questions, and nothing seems to be working for me. I’m trying to remove the filter for the woocommerce-pre-orders plugin that removes everything else from the cart if you add a pre-order item to it. I’ve tried it in the child-theme/functions.php file, I’ve added it to it’s own plugin that starts […]

Categories
CMS Mastering Development Wordpress

Sanitization and validation input fields – Settings API

I’m creating a plugin and I am a quite newbie. So I have difficulty to properly validate and sanitize input fields. This is my code: register_setting( ‘wp_banner_settings_fields’, ‘wp_banner_settings_fields’, ‘wp_banner_sanitize’ ); add_settings_section( ‘wp_banner_id’, __( ‘WP Banner Management’, ‘wp_banner’ ), array( $this, ‘wp_banner_setting_section’), ‘wp_banner_settings_sections’ ); add_settings_field( ‘wp_banner_id_turn_on’, __( ‘Enable/Disable banner’, ‘wp_banner’ ), array( $this, ‘wp_banner_field_turn_on’ ), ‘wp_banner_settings_sections’, […]

Categories
CMS Mastering Development Wordpress

A plugin that changes the CSS based on option

I’ve been trying to make a plugin (I’m new to PHP) to change the colors of my child theme CSS based on a option in the option page of my plugin, after searching and testing/trying to make it work for hours I’m afraid I have no idea how to continue. Here’s is my entire PHP […]

Categories
CMS Mastering Development Wordpress

WordPress custom routes for single posts

I created a custom route in my wordpress website. So basically I have 2 wordpress sites a big blog and a smaller one which will grab the blogs from the big one via API. I got all the posts from the big blog and now I want to create a routing /blog/post-name and I used […]

Categories
CMS Mastering Development Wordpress

How do I change the default sort order of a custom column on the posts page?

I have a fancy custom column on the posts page in the WordPress admin. I have this column set up to be sortable. The first time that you click on the column header, the URL in the address bar changes to order=asc and then each time that you click on it, it toggles back and […]

Categories
CMS Mastering Development Wordpress

Why is my custom post type not being activated on plug-in activation?

I am building a very basic plug-in, the template I have created works beautifully. However I am unable to get the custom post type to be built and displayed in the admin panel on activation. The thing that is weird to me, if I add the trigger in a construct method, the post type is […]

Categories
CMS Mastering Development Wordpress

Trouble Accessing Gravity Forms API (GFAPI)

I’m having trouble figuring out where I should be registering my function in such a way that I can access the Gravity Forms API (GFAPI). At first glance, this may appear to be native to Gravity Forms, but I think I’m just missing some basic understanding of how WordPress uses hooks and registers functions. The […]

Categories
CMS Mastering Development Wordpress

Custom Database Table Query is Slow

I have created a custom table to store member data, there are almost 80k rows. I’m trying to display this data with a custom WP List Table Class in the admin panel with this query: // Check if filtered by status $status = ( isset($_REQUEST[‘status’]) ? $_REQUEST[‘status’] : ‘all’); // Check if filtered by member […]

Categories
CMS Mastering Development Wordpress

Changing the CSS with a plugin

I’m trying to make a plugin that changes the CSS file. My client want to change the colors each season, and we want to make it foolproof so they won’t break anything. I’ve managed to create the option page but I can’t seem to get the actual function to work. <?php class SeizoensKleuren { private […]

Categories
CMS Mastering Development Wordpress

Display custom Metaboxes

I have an admin plugin where I created my own meta boxes. I need to know how do I display the meta box information on a page? When I edit the post all of the fields are populated with what I put in there, but when I post it and go to the page there […]