Dec 20, 20224:46 AM - edited Dec 20, 20224:48 AM
Member
How to get current "tag" of blog listing page and check if it is the first page
SOLVE
I am trying to write conditional logic to display a popular posts section on my blog listings pages.
I want to display this on the "tag" listing pages. I only want to display it on the 1st in the series, so any pagination /2, /3, etc will not feature the popular post section.
I see that I can do this by splitting up the url of the page:
mysite.com/blog/tag/accounting-processes
To determine the correct tag "accounting-processes" and if it is the 1st in the series.
But this seems like a silly way to do this, there is surely a "tag page" variable? which would tell me the "tag" of the current listing page and give me a way to distinguish if this is the 1st page in the series?
How to get current "tag" of blog listing page and check if it is the first page
SOLVE
Hi, @SD_dev👋 Thanks for reaching out! Hey, @Indra@Oezcan, do you have any tips for @SD_dev? Or thoughts on other ways they can think about their project?