I assume this has something to do with The Loop function. It surprises me that nobody has encountered this issue before…
Hi, can you share a link to your site so we can see exactly where youre links point? you might need to use get_stylesheet_directory() instead of network_home_url(); (not sure of this-are you using multi-site?)…
I’m currently involved in development on a localhost so there are no public pages available at this point.
My solution at this point has been to simply create a page from the admin screen with the desired content within, but this limits my ability to add code when applicable.
The problem is not with the
network_home_url()(and yes, this is multisite), but with the inability to have the index.php direct to the href link. For example, when I attempt to link to a separate file:
<a href="<?php network_home_url(); ?>/register.php">Register</a>I get a 404 error. I am able to bring up this file using an
include()call, but this is supposed to be a link, not an include.
Am I even making sense?
I suppose I’m trying to figure out a way to have either of the following code effects occur upon clicking the “Register” link:
CGAdmin, I think you need to review this page in order to sort things out. In wordpress there are 2 ways to link to pages: to have the pages created throw Dashboard->pages->add new and setting a custom template to that page or to use specific wordpress links for different tasks for example “wp-login.php”… reading the above article will give you more info,
Ohh… It didn’t even dawn on me that I could create a template.
All I did was add the template identification code to the top of my previously existing my_file.php and simply pointed the appropriate blank page in the Admin section to this proper template.
A little silly if you ask me, but it works.
- The topic ‘Manual link to new php file outside of loop?’ is closed to new replies.