Horje
wordpress get current category slug Code Example
wordpress get page slug
// Get the queried object and sanitize it
$current_page = sanitize_post( $GLOBALS['wp_the_query']->get_queried_object() );
// Get the page slug
$slug = $current_page->post_name;
get the category wp
//get category name foolproof 
echo (!empty(get_the_category($post)) ? get_the_category($post)[0]->name : '');

wordpress get current category slug
$category = get_category(get_query_var('cat'));
echo $category->slug; 
// Echo the category slug of default taxonomy (Category)




Php

Related
cannot be cast automatically to type integer laravel Code Example cannot be cast automatically to type integer laravel Code Example
genrate random password php Code Example genrate random password php Code Example
custom laravel auth Code Example custom laravel auth Code Example
php artisan make:widget Code Example php artisan make:widget Code Example
laravel env in js Code Example laravel env in js Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7