Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Condition by tag

i need to create a condition by tag.
If the page contains a tag such as "product" I want to show the message "hello". page of the tag may have definetly more.

I assume that the feature uses return_i18n_tags (). I really php dummy, so the description of this function is not decipherable for me, and I have not found anywhere any example how to use it. Could someone write a condition where it checks if the page is a tag such as "product"?

Thank you in advance
hi, if it ever helped anyone, so here is my functional outcome beginner PHP programming Smile:

PHP Code:
$tags return_i18n_tags();
     foreach (
$tags as $tag => $urls
       if (
in_array ($slug$urls)) {
            if (
$tag == "en") {echo "<strong>tag '".$tag."' was found on the page</strong>";}
Should be able to do the same without i18_n by looping over the pagesarray exploding the meta fields and checking for the tag.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix

Users browsing this thread: 1 Guest(s)