Wordpress Discussion
Wordpress Discussion
Out of context: Reply #114
- Started
- Last post
- 164 Responses
- sted2
using current pageid:
$cat= get_the_category();
$cat_id = $categories[0]->cat_ID;use get_posts
and 'category' not 'cat_id'- so $cat[0]
not $categories[0]sted - the problem with this is that you will always get only the first categories posts for that page. so it's better to paste that variable in the ajax call.sted
- I'm not sure I understand, where should I be using this? Tried below this but made things worse:
https://pastebin.com…dee-dubs
- so $cat[0]