Timeline for exclude particular posts in archive.php
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 1, 2014 at 18:19 | history | edited | Brad Dalton | CC BY-SA 3.0 |
added 129 characters in body
|
Nov 1, 2014 at 18:17 | comment | added | Brad Dalton | @Robert hue Link to the source of the code please. | |
Oct 31, 2014 at 4:04 | vote | accept | Siva | ||
Oct 31, 2014 at 4:02 | comment | added | Robert hue | With that we are skipping the check for admin wordpress query and main wordpress query. So our function should not interfere with them. But it should not affect these, so you can test it by removing. | |
Oct 31, 2014 at 3:58 | comment | added | Siva | Thanks a lot yar, its working great. I mean do we need to use this... if ( is_admin() || ! $query->is_main_query() ) return; ? please don't mind, i am fresh to wordpress that's why i am asking. | |
Oct 31, 2014 at 3:47 | comment | added | Robert hue |
In functions.php . NO, do not remove if-else conditions otherwise these posts will not display anywhere on blog. These conditions are making sure that posts do not display in archive pages only.
|
|
Oct 31, 2014 at 3:33 | comment | added | Siva | Thank you Robert, can you help how to use this function, i mean where can i put this function ? in functions.php or directly in archive.php and can i remove first 'if' condition, seems its not necessary. | |
Oct 31, 2014 at 3:08 | history | answered | Robert hue | CC BY-SA 3.0 |