Timeline for Trouble with conditional tags
Current License: CC BY-SA 3.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2014 at 11:29 | comment | added | Pieter Goosen |
Lol, ok. Ya, so if( !is_home() || !is_page() ) is the same as if ( !is_home() ) && if( !is_page() ) . Enjoy! :-)
|
|
Jul 24, 2014 at 11:20 | vote | accept | Lee Marrett | ||
Jul 24, 2014 at 11:19 | comment | added | Lee Marrett | Cool, thanks. Wasn't trying to reinvent the wheel just trying to figure out bigire's comment above that "not (A or B)" is the same as "(not A) and (not B)". No need to do any further updates, your initial edit was more than helpful, thanks! | |
Jul 24, 2014 at 6:03 | comment | added | Pieter Goosen | Please se my update. Also be so kind and accept my answer afterwards by clicking on the checkmark next to my answer in order to close the topic and keep this post constructive to everyone that find their way here. Many thanks :-) | |
Jul 24, 2014 at 6:01 | history | edited | Pieter Goosen | CC BY-SA 3.0 |
add edit 2
|
Jul 23, 2014 at 21:14 | comment | added | Lee Marrett | Incidentally, would !(is_home() || is_page('archive')) be the same as !is_home() || !is_page('archive') ? | |
Jul 23, 2014 at 21:12 | comment | added | Lee Marrett | This is brilliant thank you. So Mark was right, although you were far more helpful. Conditional logic has always been a weak point for me. | |
Jul 23, 2014 at 13:47 | comment | added | Pieter Goosen | Please see my edit. This should be enough to explain | |
Jul 23, 2014 at 12:23 | history | undeleted | Pieter Goosen | ||
Jul 23, 2014 at 12:23 | history | edited | Pieter Goosen | CC BY-SA 3.0 |
added 1001 characters in body
|
Jul 23, 2014 at 11:37 | history | deleted | Pieter Goosen | via Vote | |
Jul 23, 2014 at 11:23 | comment | added | Lee Marrett | This should explain what I mean: wordpress.stackexchange.com/questions/22661/… | |
Jul 23, 2014 at 11:21 | comment | added | Pieter Goosen |
What do you mean archive index. is_archive() checks to if an archive page is being displayed. Please see the code link i've provided
|
|
Jul 23, 2014 at 11:21 | comment | added | Lee Marrett | Also, I have done extensive reading of the codex, and especially the conditional tags page. As stated, individually, each of those checks are working as they should. It's when I put them together that its not doing what it should. | |
Jul 23, 2014 at 11:17 | comment | added | Lee Marrett | From the reading I've done, is_archive only works on archive posts, not the archive index. I should have been clear here, and I trimmed my code to make it more readable; the line of code is actually: <?php if ( !is_home() || !is_page('exhibition-archive') ) { ?> where 'exhibition-archive' is the archives list page. | |
Jul 23, 2014 at 9:06 | history | edited | Pieter Goosen | CC BY-SA 3.0 |
deleted 23 characters in body
|
Jul 23, 2014 at 8:59 | history | answered | Pieter Goosen | CC BY-SA 3.0 |