Now that the WP-API is in core, here are some useful tips for you. Filtering Posts Filtering posts was a bit confusing for me at first, because the documentation seems to suggest you would visit an endpoint like /posts/category/40 to get posts from a certain category. Instead, you are supposed to use arguments in your […]
If you worked with the first version of the WP-API, you know that getting custom post types was really easy. To get all posts, I could send a GET request to http://scottbolinger.com/wp-json/posts. To get a specific type, I could send my request to http://scottbolinger.com/wp-json/posts?type=event. There have been some pretty big changes in version 2, which […]
Working on the WP-App Project, we need to use authentication to do certain things in the app. Deleting/approving comments, or listing users for example. Basic Authentication is handy for testing code, but it should only be used in development, since you send the user/pass with every request. For production, you’ll want to use OAuth from […]
I’m a huge fan of icon fonts, and Font Awesome is the best one. Version 4 is out, and if you are updating from version 3, here’s what you need to know.
Cut jpeg (.jpg) image size down by up to 63% in Photoshop without losing quality. What I normally do with .jpg images is save them at about 70% quality in Photoshop. That seems to be a safe place to retain acceptable quality while still slimming down file size. This trick absolutely blows that technique out […]
Ever use a script that had a url without the http like this? <script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> I always wondered what that was about. Turns out it allows your browser to download the resource through http or https, which gets rid of any pesky warning messages about “Non-secure items” when viewing an https page.