Dreb Bits

Category: WordPress

A Brief Reunion with WooCommerce

For the past weeks I got the chance to work with WooCommerce (WC) again. Although the plugin has grown so much, including it’s seamless integration with Stripe, I just noticed one (small) thing. Orders shouldn’t be under WC in the admin menu.

Current menu structure is this:

 

In my mind it should introduce order as it’s own parent menu and separate all WC configuration related items:

I wouldn’t mind few menus popping out there when WC is installed. It’s all about the accessibility of managing my eCommerce store anyway.

DDI x WordPress Davao

To kickoff my year, our local WordPress group was invited to give a talk-workshop to #teamDDI folks at Davao Digital Influencers Inc. It’s a half day event choke-full of user-facing WordPress know-hows directed to those who aspire to blog with WordPress. There will be a blog post coming up in the official WordPress Davao blog.

Here’s my slide to my talk Supercharge Your Blog with WordPress:

(adding the slides URL here soon)

References

Here are the things I mentioned in the talk that reference to plugins and sites:

Welcome to WordPress

One of our local WordPress group members asked how to begin and where to start learning WordPress. I thought it was just a simple question. But somehow I looked around and as someone who has a bit of experience with this platform, where would I direct those who are starting out?

If you have a bit of budget for trainings:

My personal bookmarks:

Lastly…

And by the way, welcome to WordPress ❤

Purge Varnish Cache on Save

In case, someone out there trying to figure out how to purge varnish (3.x) cache in your WordPress site when updating a post/page — I’ve dealt with it this week and it’s pretty easy to accomplish it.

Now that we’re talking about purging the cache, I presumed you have varnish configured and all your setup works. To start off, if there’s no definition of purging in your vcl file, you might want to add them — https://www.varnish-cache.org/docs/3.0/tutorial/purging.html. Remember to sudo service varnish restart after modifying the file so the changes will take effect.

Now in your ever lovely WordPress:


/** * Purge Varnish cache on save * * @param int $post_id Post ID. */ function awesome_save_post( $post_id ) { wp_remote_request( esc_url( get_permalink( $post_id ) ), array( 'method' => 'PURGE' ) ); // Or store the response if you'd like to verify it further. } add_action( 'save_post', 'awesome_save_post' );

You can pop that in in your code if you only need to invalidate cache for content. For a verbose invalidation such as commenting or deleting an item and when changing themes, checkout Varnish HTTP Purge that is readily available in WordPress plugin repo.

First WordCamp

I’m finally going for my first ever WordCamp. Not only I am attending, but I’ll give a talk as well. In WordCamp Singapore, you will hear me talk about the advantages of utilizing WordPress hooks. How they can massively help pushing features into a large codebase/theme become almost a cinch. When is the best time to add a hook and where you can usually best place a hook. Ultimately, I hope to give you an idea on how actions and filters work in the WordPress ecosystem.

Please checkout the WordCamp Singapore site for other amazing talks and schedule — https://2016.singapore.wordcamp.org/

Watch #WCEU 2016

For those who missed the live-stream of WordCamp Europe 2016 or missed several talks, you can watch the recorded videos right in the #WCEU 2016 official website.

http://2016.europe.wordcamp.org/schedule/track-1-livestream/

First time I joined the event, although virtually, but I had a ton of learning out of watching several speakers talks. It’s amazing to know how these super talented people collaborate for this beautiful thing called WordPress to grow.

If you can’t watch all the videos, I suggest these topics a.k.a the ones I’ve watched:

Honestly, I think almost all the talks are worth watching. I’d definitely go back and watch those that I missed.

Updated ACF Enhanced Message Field

I’m not sure when was the last time I touched this WordPress plugin but nonetheless, i’ve finally got some time to work on several updates. And below are the list of changes that you’ll find in 1.1.0:

  • Compatible with ACF 4.4.6 and ACF Pro 5.3.7
  • Prevent class conflict if this plugin is already added directly in your plugin/theme.
  • Fix: Prevent style being printed in JSON export

You know the drill when an update is available 🙂

WordPress 4.5 is coming up

WordPress 4.5 is coming up! Peruse this guide for the developer-focused changes  https://make.wordpress.org/core/2016/03/30/wordpress-4-5-field-guide/.

Pay attention to Backbone and Underscore being updated. Might break your scripts (e.g Add button in media library #35853), so make sure to test your code. While you’re at it, it’s even better to test other parts of your plugins and themes with the rest of the changes included in this release. 🍷

Simple Act of Contributing

Ever since I got familiar with how the WordPress maintain its codebase and the community behind that pushes fixes and features, I’d always imagine my self being a part of it. And the recent release, WordPress 4.4, is the start of the journey.

I didn’t do much but the simple act of updating a doc block is something could be truly appreciated by the community (core). Once you’re in there, you’ll know how they work hard and not thinking about how their efforts are being compensated. Some #10uppers are part of those who look into the platform very closely and I got in because of them as well. You just need to be in the right team to get you started 🙂

Now the plugin badge will never be alone.

Screenshot 2015-12-16 01.19.33

Always the Way to Blog

I could remember I started blogging way back in 2008 when I got no other things to do aside from taking classes in college and playing online games (RAN is on top of my head). My aunt was and is always going to be my inspiration of why I got my self into this kind of stuff.

I started using blogspot. Then moved to self hosted WordPress with the help of such wonderful aunt, who used to be a web designer and developer that time! I remember it was around version 2.x (somewhere 2.6 or 2.8) of WordPress that time. The admin/dashboard and post editor were the best thing I’ve ever seen! And that feeling you had when you’re so excited about learning how these things work. But then, I’ve had this bipolarity when it comes to where I truly want to blog. Back to blogspot, moved to tumblr, then moved to WordPress.com after deducing that WordPress is the genuine way to blog. I’ve tried so different names/blog URL and tried blogging for different niches—hoping I could get advertisement earnings or sponsorship out of it. The online is a wild jungle where you can try to be anything it influences you to be. Me moving with different platforms and under different names suggested I underwent personal issue that time—I’ve been trying to find who I really was.

Until finally I bought my own domain and dropped the idea to blog for glamour and profit. But I didn’t settle with it as my domain for blogging yet. It was initially there to help me established my portfolio as a web developer. I’ve got so many things to say that I don’t want to limit it with just anything about my career, so I created a dedicated blog for anything under the sun on WordPress.com. That didn’t last for long though.

I don’t actually want to maintain more than one blog and I realized all I want to share pertaining to my self is always going to be who I am—as a whole—and this domain is going to be my persona in the online arena. So I’m back at blogging full time in this very place.

I secretly envy blogs that have archives way back from 2004 or older. Reading from those treasures make you to time travel (compressed in small bytes) and reminisce the moment. Ultimately, you see how you’ve grown since then.

It’s amazing how the platform you’ve been using grows with you, too. Now I can blog directly on my desktop just because WordPress.com released an app (which now an open source project!) that changed the direction of blogging. I know there are other innovative and modern tools to blog but when you stick with yours, and not leave it hanging when there’s new and hot out there, but instead help it grow with you—It’s a different feeling you get. It’s like family, no matter how you think you’re so fed up seeing their faces, there’s an intimate connection that makes you want to see them again and again. And like family, you don’t turn your back when time gets so difficult.

Blogging is always going to be different with WordPress—it’s about openness and community. I settled on this. I should’ve sticked with it.

As someone who helps make things (read: websites) on the web, the project they brought into this world spurs me to keep creating and venture to innovate with openness in mind.

If you haven’t started blogging yet, only God knows the reason why is that, but hopefully tools like this makes you to re-think about kickstarting a blogging journey. You don’t want to miss the chance to grin when you read your posts published from 5 or 10yrs ago.