Tag Archives: wordpress

WordPress Get the current post slug

Hi there, I have search the net and this person found a way to get the slug the easier way.

 

The common approach:

$post_obj = $wp_query->get_queried_object();
$post_ID = $post_obj->ID;
$post_title = $post_obj->post_title;
$post_slug = $post_obj->post_name;

His approach:

$slug = basename(get_permalink());

That's it. Just include it inside the_loop.
Source: http://www.joshstauffer.com/get-post-slug-in-wordpress/

 

WordPress Themes 1

Hi there!

I have some HTML/CSS Website that I have converted to a WordPress template. Here are the templates try it!

Try it, its Free. All copyrights of the template remains of the owner. I just convert them to a WordPress Template.