wordpress website crash on https

This is likely caused by insecure content. WordPress is serving resources (images, stylesheets or scripts) over http instead of https. To resolve this try the following plugins: Basic SSL setup for WordPress: https://en-ca.wordpress.org/plugins/really-simple-ssl/ This one will find any internal link/resource request over http and change to https. https://en-ca.wordpress.org/plugins/ssl-insecure-content-fixer/

Dispise all efforts, open graph is a total mess

The main issue is Missing Properties – “The following required properties are missing: fb:app_id“. You need to add an fb:app_id. I also see an error for Extraneous properties specified. “The following properties are specified on the webpage but NOT supported for the specified og:type : fb:admin

Automatically put a menu on every post

Without knowing where exactly you want to put this (all posts, certain categories, etc.) I will give you the way to do it across the board. First step is to go into functions.php and find the function where your menus are being defined. Inside that function add the following code: register_nav_menu( ‘dmca’, __( ‘DMCA’, ‘theme-slug’ … Read more

Add new MCE button for toggle specific cell background color

I have found a great tutorial about making a custom button to the tinymce. http://qnimate.com/adding-buttons-to-wordpress-visual-editor/ You can just follow this guide and copy all of it. Don’t forget to activate your new plugin in the plugin menu (in admin panel). Then you can just change the code inside index.js and especially in the ed.addCommand(“green_command”, function() … Read more

How can I add new attributes in a Class when my addon is active?

You need to declare a location for this data in your class, like an array beforehand and then use it like below: class test { private $first_name; private $data = array(); public function __set($name, $value) { $this->data[$name] = $value; } public function __get($name) { if (array_key_exists($name, $this->data)) return $this->data[$name]; else return ‘not found’; } } … Read more

send meta box input data without publish button

You can get the post id like this var post_id = $(‘input[name=”post_ID”]’).val(); See this full working code. BTW its only save the value to the meta in the ajax it won’t save it on the publish button you need to add another hook with another function. you can’t use the same function that you used … Read more

Need help saving input fields for Security Deposit plugin in WC Vendors page

You will need to add a custom field to the product-edit form, saving is done automatically if you correctly format your input id. WCVendors_Pro_Form_Helper::input( array( ‘type’ => ‘checkbox’, ‘post_id’ => $object_id, ‘id’ => ‘wcv_custom_product__wc_security_deposits_enable’, ‘label’ => __( ‘Ingredients’, ‘wcvendors-pro’ ), ‘placeholder’ => __( ‘Ingredients’, ‘wcvendors-pro’ ), ‘desc_tip’ => ‘true’, ‘description’ => __( ‘Enable this to … Read more

Reading CSV values and showing them in PHP

Not too hard really… $csvdata = file_get_contents($filepath); $lines = explode(“\n”, $csvdata); // split data by new lines foreach ($lines as $i => $line) { $values = explode(‘,’, $line); // split lines by commas // set values removing them as we ago $linevalues[$i][‘name’] = trim($values[0]); unset($values[0]); $linevalues[$i][‘country’] = trim($values[1]); unset($values[1]); $linevalues[$i][‘color’] = trim($values[2]); unset($values[2]); // assign … Read more