21Aug

WordPress passing variables to get_template_part()

I was using advanced custom fields and the flexible content (and clone fields). To keep the code easy to maintain I have some of the flexible content section in their own file. I needed to pass variables to those files.

21Jan

How to work with the WP REST API v2

WordPress has its REST API which allow to retrieve all your data through JSON. You can use the data from your CMS into your pages without the WordPress PHP structure. Plugins are no longer required, just install the latest version of WordPress 4.7 or more and you’re ready to go.

21Nov

Allow subscriber to see private page in WordPress

I recently had a WordPress problem. I used a plugin to redirect user seeing private page to the login page. However, subscribers can’t see private post once logged in. So it was creating a redirect loop. You can change that with a few lines of code.