Elseif statement fails for some odd reason…
-
Hey all,
I am working with a customized template for a photographer site. There is a plugin where the admin can add galleries. Each gallery is created using a Category name and Sub Category which is stored in a table of it’s own in the DB.
I need to display the current page/category name on the site.
Since the names of each possible “page” name is not only stored in wp_title(); I need to grab the other possibilities from my new table.
if these two are non existent then I need to display “HOME” for the page title.
Here is where my if statement comes in.
$pages = wp_title("",true); if($subCats) { $allcat = "$cats : $subCats"; } elseif(!$subCats) { $allcat = "$pages"; } else { $allcat = 'HOME'; }
Now, it’s grabbing everything perfectly BUT the last else statement.
I have also tried to reorder them and still that last else statement doesn’t do it.
I really hope I have been clear here as to my troubles and hope someone can help me out.
Thanks in advance for taking a look,
- The topic ‘Elseif statement fails for some odd reason…’ is closed to new replies.