Articles of development

New to WordPress – Read the Codex, Other Docs; Still Confused

I’m new to web development and WordPress. I recently installed WordPress on my site. However, that is not the WordPress page; don’t get ahead of me! That page was created using Bootstrap. From my readings, I’ve learned that I need to create my own theme if I want to use that same styling that I […]

Custom Post Types database persistance. Why not?

My background is .NET/C#/Laravel e.t.c I am beginning to like very much WP and i started educating myself on using WordPress as a development framework. I tried something very simple. Create an entity and have a basic CRUD on this entity and then show it up in my frontend. Nothing tricky right? So after reading […]

Right procedure when you develop a WP Website for a client

i don’t know if this procedure could be incorrect while you develop a WP website for a client, but i worked like this for years: create a database and sub-domain on my server install WordPress and the relative template start to develop the website When everything is ok for the client export the Website (plus […]

How to call a widget in a loop at a specific iteration value?

On the index page of my website. I want to display a widget in the third position. I am calling the widget through “the_widget( ‘Widget Name’ );” code. Now the problem is, since it doesn’t return anything. It will display the widget in the first position in my loop. Is there any way, I can […]

How to proxy local WP uploads folder to live site

Stack: MAMP PRO on OSX 10.11.5 (El Cap) Scenario: I’m developing a site locally, and there is already a live version of the site online. Rather than download all 4gb of the uploads folder, I’d like to have my local site just load the images from the live URL instead. Concept: Through lots of searching, […]

How to create plugin in wordpress

How to create plugin in wordpress

Order properties should not be accessed directly

This code: foreach ($order->meta_data as $row) { if ($row->key == ‘tid’) { $tid = $row->value; break; } } within the function function function_name($order_id, $checkout = null) { global $woocommerce; $order = new WC_Order($order_id); foreach ($order->meta_data as $row) { if ($row->key == ‘tid’) { $tid = $row->value; break; } } if (!empty($tid)) { … } } […]

Cloning and syncing a WordPress website

I plan to bulid up a nice developer environment and for this I need to clone the actual running website to a 100% into a dev directory. I’ve now uploaded the same version of wordpress as on my running site and wondering if I could enter the same database and the same prefix as for […]

How to create a plugin that includes all the other plugins?

Is there a way to create a plugin which include others plugins? Obviously I will take care of updating all the plugins included in mine. I haven’t found any info about it. Basically I want to package various basic plugins I always use for my less tech-savvy clients into a single one.

woocommerce_before_calculate_totals in woocommerce 3.0

I recently made the jump from woocommerce 2.7 to 3.1 I’m having issues with the woocommerce_before_calculate_totals hook on the below function. function calculate_embossing_fee( $cart_object ) { if( !WC()->session->__isset( “reload_checkout” )) { /* Gift wrap price */ $additionalPrice = 5; foreach ( $cart_object->cart_contents as $key => $value ) { if( isset( $value[“embossing_fee”] ) ) { $orgPrice […]