[Snippet] WordPress: Hide Post By Author From Admin Post List

There is a situation where we need to hide a post written by user A from user B while both of them has same role as “Editor”.

Let’s say we have two user as follow:

UserA with ID 17 and roles Editor
UserB with ID 9 and roles Editor

We need to hide all post by UserB so UserA cannot see it in WordPress Post List (admin page).

Code snippet below may help you to do this in easily.

Modified as you want 😀

[Snippet] Get All Post From Blogger In JSON Format

The time during this blog post written, Blogger API v3 is still not available to use by public. To use the API, you need to fill in the Google Form and request for an access.

I try to get all of my post from Blogger blog yesterday. I found that we can use JSON request to get all post from a blog in blogger without any restriction.

The following is a code snippet that I use to get all post from my blog in blogger.

As you can see in example above, I’m trying to get 500 recent post from  Blogger Developers Network. Feel free to review and update the code above as what you need. 🙂

Have a nice day!


[Snippet] CSS: Add Numbering For Each Row of Table

Using modern CSS, we can generate a set of numbering for each of table row of a table.

Let’s say we have a table in html as follow

To create a  numeric for table row in our first table data column, we will only use a modern CSS as follow

Numeric 1,2,3,… will be added to our first td for each tr. Modified the css code above as you want.