SLUG are used in WordPress ( permalinks structure. ).Basically it is a unique name auto generated by word press. You can also change it...You get specific POST and page content by using slug.It is always in small letters with "-".
For example:
www.abc.com/slug-test
Here is the method to get Slug
<?php
$slug = get_post( $post )->post_name;
echo $slug;
?>
Now you have unique name use it and get the specific post and page content by using manual method of POST.
For example:
www.abc.com/slug-test
Here is the method to get Slug
<?php
$slug = get_post( $post )->post_name;
echo $slug;
?>
Now you have unique name use it and get the specific post and page content by using manual method of POST.
No comments:
Post a Comment