{"id":3887505,"date":"2013-06-29T17:01:55","date_gmt":"2013-06-29T17:01:55","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/include-file\/"},"modified":"2016-08-21T02:28:26","modified_gmt":"2016-08-21T02:28:26","slug":"include-file","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/include-file\/","title":{"rendered":"Include File"},"content":{"rendered":"<p>I have made a file in &#8220;<strong>\/wp-content\/themes\/mytheme\/inc\/slider.php<\/strong>&#8220;<br \/>\nNow I want to include the file in index.php. I tried with include_once<br \/>\n<code>include_once get_template_directory_uri().&quot;inc\/slider.php&quot;;<\/code><br \/>\nbut I get following error :<\/p>\n<blockquote>\n<p>Warning: include_once(): http:\/\/ wrapper is disabled in the server configuration by allow_url_include=0<\/p>\n<\/blockquote>\n<p>Can you please tell the best way to include a file placed inside a theme?<\/p>\n","protected":false},"template":"","class_list":["post-3887505","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3887505","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\/3887505\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3887505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}