Skip to main content
7 events
when toggle format what by license comment
May 27, 2013 at 19:52 comment added s_ha_dum In an earlier version of your question you mentioned that you wanted to "display this content in front page" so I use !is_front_page-- "not is front page"-- to return the default content for all pages except the front page. is_page() || is_single() does something similar but different. That will be true for either a page or a single post display. The Codex entries for those functions will give you the details.
May 27, 2013 at 19:28 comment added Chameron i have updated this code, you can see and let me know the different the if (is_page() || is_single()) and if (!is_front_page()) return $content;
May 27, 2013 at 19:18 comment added s_ha_dum I do not understand the question in the previous comment but you can add or remove as many conditions as you need to make it work the way you want.
May 27, 2013 at 19:16 comment added Chameron i want it apply for all post/page type. Simple replace with special content if it exists on this post/page.
May 27, 2013 at 19:07 vote accept Chameron
May 27, 2013 at 19:05 comment added Chameron thank you, that is what i want :) and if i want to do it with page type, only need check global $post, $page;
May 27, 2013 at 18:59 history answered s_ha_dum CC BY-SA 3.0