Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
How to Get current category ID wordpress
salmancreation
Jul 8th, 2015
371
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
PHP
0.22 KB
| None
|
0
0
raw
download
clone
embed
print
report
<?php
function
currentCatID
(
)
{
global
$wp_query
;
if
(
is_category
(
)
||
is_single
(
)
)
{
$cat_ID
=
get_query_var
(
'cat'
)
;
}
return
$cat_ID
;
}
?>
<?php
echo
currentCatID
(
)
;
?>
Advertisement
Add Comment
Please,
Sign In
to add comment
Public Pastes
How to hack an exchange
CSS | 12 min ago | 1.01 KB
This month smells like money
CSS | 12 min ago | 1.01 KB
✅ Free Money Exploit
CSS | 12 min ago | 1.01 KB
✅ Changelly Exploit
CSS | 12 min ago | 1.01 KB
Get $12,000 from this mehtod
CSS | 14 min ago | 0.86 KB
✅ +12,000$ in 2 days
CSS | 14 min ago | 0.86 KB
✅ Easiest method for beginners
CSS | 20 min ago | 1.01 KB
Money comes easy nowadays
CSS | 20 min ago | 1.01 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!