I generally encounter a predicament where "the forces that be" want a precise copy of the page in multiple places online. Instead of really duplicate this content, all I actually do is override the section within the nav that's outlined, after which range from the page. The ultimate page looks something similar to this:

    $top_nav_item_id = 'teen';

This typically works. I'm attempting to duplicate this for any blog category, completed in wordpress. All I appear to obtain is really a blank page, regardless of what I actually do. I have attempted the following lines:


Does anybody have ideas? Is a URL spinning factor? Must i range from the template file for your particular category?

Any assistance is appreciated.

This option would be a little of the hack, however, the issue is a little of the hack to start with.

I received a great explanation of why I could not range from the website, although not any options that will work with me.

My final solution ended up being to customize the category template for your page directly. As mentioned initially, I personally use $top_nav_item_id to manage which food selection is outlined within the nav, to own appearance from the page owned by that section. Instead of override this, I merely managed to get depending on a question string. As lengthy because the user is following legit links on my small site, they'll obtain the correct query string and also have no problems.

$_Publish is disabled in Wordpress. $query_string (included in Wordpress) uses some kind of caching, and would always display as it was initially loaded.

Final solution:

if(strtolower($_SERVER['QUERY_STRING'])=='display=teen') {
	$top_nav_item_id = 'teen';
} else {
	$top_nav_item_id = 'programs';

Because of all who attempted to assist.

For similar issues I personally use iframes to incorporate the copy from the content. You are able to write the initial page to search for an "?embed=1" flag within the url, and just range from the embeddable content within the primary page once the embed flag exists (so that you can omit tool bars and frames that might be redundant.) Therefore the iframe src url would make use of the ?embed=1 tag to embed this content.

ini_set('display_errors', true);

No clue what is going on wrong, however it does. Maybe Wordpress aren't able to find it's atmosphere, maybe some variables are now being overrided... Really it's an awful idea to incorporate solutions like wordpress, because who knows, what global variables, functions, classes will intersect.

PS: And, incidentally, include uses file system pathways although not Web addresses.

This can be a pretty complicated subject, and something that is not very apparent from the beginning. This page should help you to get began. The bottom line is to incorporate the WordPress blog header - described around the linked page. You'll most likely likewise want to look into the WordPress Codex for assets on while using WordPress engine's API.

PHP include needs files, not Web addresses, therefore it does not have the URL namespace uncovered by WordPress. Individuals files don't exist on-disk mod_rewrite first turns the beautiful Web addresses into an interior request to index.php, WordPress understands that which you wanted in line with the original URL, brings a lot of stuff in the database, then creates the page.