The website has resulted in too many redirects (redirect plugin)?

Tools>>Redirection>>Options>> “URL Monitoring: You can have Redirection detect changes in URLs and have an automatic redirection created in a specific group.” If this option is set to “Monitor”, you will get loops and strange redirections if you change a page or posts’ URL with a redirect and then change them back to the original URL.

Overide a function that is inside a plugin

If there are hooks in the function, this is possible, if not, there may be pluggable functions, where you can replace their function with your own custom function. I have not seen pluggables in plugins frequently, but with most of the more popular plugins, you do see actions and filters. You may be able to … Read more

Edits to plugin not taking effect

Easiest way to test for caching – make a plugin-breaking change (remove a ; or something), upload it, and see what happens. If your admin panel whitescreens, congratulations – you don’t have caching. If it doesn’t, chances are your server is caching all php content with something APC. Contact them and ask about caching.

How to remove the whitespace in image name and save the new file

Use sanitize_file_name( $filename ). This function doesn’t just catch white space, it removes other special characters too: $special_chars = array( “?”, “[“, “]”, “https://wordpress.stackexchange.com/”, “\\”, “=”, “<“, “>”, “:”, “;”, “,”, “‘”, “\””, “&”, “$”, “#”, “*”, “(“, “)”, “|”, “~”, “`”, “!”, “{“, “}”, chr(0) ); Find the following line in the plugin’s code: … Read more

How to edit/delete single row items in a table on my own menu page

WordPress allows you to use a class called wpdb Here is an example of how you would use it function add_to_db() { global $wpdb; $your_table_name = $wpdb->prefix . “wp-LINKS-list-table”; $the_value=”123″; $wpdb->insert( $your_table_name, array(‘column_name’ => $the_value,)); this will insert 123 into the column_name. You can read more here Note: If you are creating a menu page … Read more

Woocommerce Custom CSV export

Ain’t this just a matter of opening the exported CSV with all products on their own row and doing a global search/replace of “carriage returns” for “commas“? This way you get the format in your example… Example: Item Name_01, Item Quantity_01, Item Variation_01, Item Amount_01, Item Total Price_01, Item Name_02, Item Quantity_02, Item Variation_02, Item … Read more

Opendir and WordPress Path

Here is an example… //..path/to/wp-content/plugins/your-plugin-basedir/ $path = plugin_dir_path( __FILE__); //..directory within your plugin $path .= ‘templates’; //..continue with your script… $dir_handle = @opendir($path) or die(“Cannot open the damn file $path”); UPDATE I tested the rest of your script by the way, to see if it in fact did read the directory and list files with … Read more