Detect if current page is a subpage in worpdress

This is a useful function created by Matt Varone. It detects if the current page is a subpage, you can use it either inside or outside the loop. Here is the piece of code you have to paste in functions.php template. function is_subpage() {  global $post, $wpdb;    if ( is_page() AND isset( $post->post_parent ) [...]

Read more!

Working with photoshop type

There are two ways you can work with type in photoshop: point type and paragraph type. Point type comes up when you click anywhere in the canvas and start typing right after you click. Paragraph type is used when you drag a box using the type tool. However, you can convert point type to paragraph [...]

Read more!

Get page URL by title in wordpress

This snippet of wordpress code allows you to get the URL of a page by its title. It doesn’t have to be in the loop. It first sets a variable that gets the page object using the title of the page, then it echos the URL (the permanent link) using the ID got using that [...]

Read more!

Exclude in wp_list_categories by slug

This snippet allows you to get the ID of the category with the category slug. Then it inserts it into the wp_list_categories tag.

Read more!

Show children categories of displayed post parent category in wordpress

The baseline of this snippet is the the_content tag. However, that code does not allow us to get rid of the parent category and link it has around it. I wanted to find out how to display the child category of the displayed post without showing the parent category. So if you if you are [...]

Read more!

Exclude dynamic IP from google analytics

Note: This is just an update of the post Count me out Last year, the analytics talk blog released a post about how to exclude dynamic IP from the reports of google analytics titled Count me out. Now it is pretty outdated, since google analytics uses new asynchronous code which has changed a lot the [...]

Read more!