WordPress – Page 13

pre_user_query tutorial: hiding the user with the exact ID, hiding the users by the role, extending the user search

First of all you should know one important moment. There are two base user query action hooks:

  1. pre_get_users — it fires before WP_User_Query has been parsed and allows you to change some query vars like include, exclude, order, orderby etc.
  2. pre_user_query fires after

How to get the comment author name, email and website from his cookies?

I’m sure there are a lot of things where this function could be helpful. As for me I wanted the following: someone posts a comment on the website and when he goes to contact me page, the respond form would be filled with this data automatically

Author Filter in WordPress admin

There is already a tutorial about custom taxonomy filter on my blog. Now it is time how to create a similar filter by authors.

Please note, that the filter is going to work for every registered post type by default unless you add a custom condition in the beginning of the function.

And here is how it is going to look like

filter posts by author in WordPress admin

Remove taxonomy slugs (categories, post tags and custom taxonomies) from URL

In this post I will show you how to remove «category» from WordPress categories URL,

How to remove category slug from URLs

how to remove «tag» from post tags URLs,

How to remove tag from post_tags URLs.

and how to remove custom taxonomy slugs

Permalink post_type structure with taxonomy slug in it

Let’s look at the simple example of a eshop on WordPress.

The shop has custom post type product and category for products product_cat. By default product links looks like

How to Change URL of a custom post / page / category / tag in theme functions.php. Capitalize URL.

If you read this post, you should know something about WP_Rewrite class. It allows you to change WordPress permalinks rewrite reules, change the structure of them.

In this post I won’t use WP_Rewrite, I just want to show you another way of

Responsive Images feature in WordPress