wp_nav_menu doesn’t work in a duplicate server

The menu data is in the database. In order to have an exact copy, you need to copy the files and all the items in the database as well. Verify if all the needed elements from the database are present in the wordpress admin and or with phpmyadmin. Alternatively, after these lines in your PHP … Read more

Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING

I found the solution by logging into the site FTP, renaming my WP site’s index.php to index.php_, and supplying this code in a new index.php file: <!DOCTYPE html> <html> <body> <?php $servername = “xxx.xxx.xxx.xxx”; $username = “xxxxx”; $password = “xxxxx”; try { $conn = new PDO(“mysql:host=$servername;dbname=xxxxxx”, $username, $password); // set the PDO error mode to … Read more

Slider from different widgets

Found a (half)solution. Slick is very helpful. I integrated this in a template. The data now is static so that need to be changed. I created a sidebar but now I need to loop through the widgets. I think I’m trying to use this Still any ideas/thoughts are more than welcome!

Create a dynamic buddupress tab

You can’t use an object variable, $user->display_name, in a string. And why would you want a tab that links back to the member being viewed? You’re already viewing that member. This will provide the url of the displayed member: bp_displayed_user_domain() So you could do this: function redirect_user_to_tab3(){ bp_core_redirect( bp_displayed_user_domain() ); } If you just want … Read more

WooCommerce – Print Processing orders [closed]

Here’s the solution: Remove the SKU table header Add (SKU) to the Product header Product (SKU) pass false, true in email_order_items_table function $order->email_order_items_table(false, true) This is not the visual result you were expecting, but it works and it shows the SKU. The second parameter in email_order_items_table indicates whether to show the SKU or not.

Ajax call URL 404’ing when pushed to staging server

Take a look at wp localize script. It’ll allow you to encode your url into a separate javascript object before your script is loaded. get_template_directory retrieves the absolute path to the directory of the current theme. Use it in case your WP install directory is different than your local development. The theme directory can also … Read more