{"id":1261250,"date":"2009-10-30T09:58:04","date_gmt":"2009-10-30T09:58:04","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-list_page-function-how-to-excluse-pages\/"},"modified":"2016-08-19T14:28:05","modified_gmt":"2016-08-19T14:28:05","slug":"custom-list_page-function-how-to-excluse-pages","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-list_page-function-how-to-excluse-pages\/","title":{"rendered":"Custom List_Page Function How to Excluse Pages?"},"content":{"rendered":"<p>I have this theme and it uses a custom function to list pages, therefor I can&#8217;t excluse pages with the usual excluse or plugin. How can I excluse a page using this custom fs_list_pages function?<\/p>\n<pre><code># Displays a list of pages\n$fs_first = true;\nfunction fs_list_pages($parent=0) {\n\tglobal $fs_first;\n\t$pages = fs_get_pages($parent);\n\tif (count($pages)&gt;0) {\n\t\t?&gt;&lt;ul&gt;&lt;?php\n\t\tif ($fs_first) {\n\t\t\t?&gt;&lt;li class=&quot;f&quot;&gt;&lt;a href=&quot;&lt;?php echo get_option(&#039;home&#039;); ?&gt;&quot;&gt;ACCEUIL&lt;\/a&gt;&lt;\/li&gt;&lt;?php\n\t\t\t$fs_first = false;\n\t\t}\n\t\tforeach ($pages as $page) {\n\t\t\tif ($page-&gt;id&gt;0) {\n\t\t\t\t?&gt;&lt;li&gt;&lt;a href=&quot;&lt;?php echo get_permalink($page-&gt;id); ?&gt;&quot;&gt;&lt;?php echo $page-&gt;title; ?&gt;&lt;?php if (fs_has_subpages($page-&gt;id)) echo &#039; &amp;raquo;&#039;; ?&gt;&lt;\/a&gt;\n\t\t\t\t&lt;?php $count = fs_list_pages($page-&gt;id); ?&gt;\n\t\t\t\t&lt;\/li&gt;&lt;?php\n\t\t\t}\n\t\t\t\t\t\tif ($page-&gt;id&gt;0) {\n\t\t\t\t?&gt;&lt;?php\n\t\t\t}\n\t\t}\n\t\t?&gt;&lt;\/ul&gt;&lt;?php\n\t}\n\t$count++;\n\treturn $count;\n}<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-1261250","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1261250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/1261250\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=1261250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}