Unstoppable Domains — Expired Auctions

Static Page with Wordpress

SpaceshipSpaceship
Watch

Ik

Quality //VIP Member
Impact
8
Hi,

I get a 404 error when I try to access a static page that I added inside my Wordpress site.

Here is how I access it, http://www.mysite.com/wp/vid.php

and here is the code I'm using:

vid.php
Code:
<?php get_header(); ?>
some HTML
<?php get_footer(); ?>

header.php
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<title><?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

</head>
<body>

<!-- header -->
<div id="header-wrapper">
<div id="logo">
	<a href="index.php"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg" /></a>
</div>
<div id="hptop" style="position:absolute; top:0px; left:760px;"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/headerbg2.jpg" /></div>
</div>

<!-- main navigation -->
<div id="navi">
	<ul>
	<li><a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi1.png" /></a></li>
	<li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi2.png" />
		<ul>
			<li><a href="#">About Reverse Mortgages</a></li>
		</ul>
	</a></li>
	<li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi3.png" /></a></li>
	<li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi4.png" /></a></li>
	<li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi5.png" /></a></li>
	<li><a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/navi6.png" /></a></li>
	<div class="clear"></div>
	</ul>
</div>

<!-- seperator -->
<!--<div id="sep"> </div>-->

<!-- body wrapper -->
<div id="body-wrapper">

<div id="left2">
	<div id="visual">
		<?php
			$visual = "visual" . rand(1, 3) . ".jpg";
		?>
		<img src="<?php bloginfo('stylesheet_directory'); ?>/visuals/<?php echo $visual; ?>" width="700" />
	</div>

footer.php
Code:
</div>

<!-- footer -->
<div id="footer">
<strong>Connect with Us</strong>
<br /><br />
<a href="#">Facebook</a>  |  <a href="#">Twitter</a>  |  <a href="#">MySpace</a>  |  <a href="#">LinkedIn</a>
<br /><br />
<a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/footerlogo1.jpg" /></a>  <a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/footerlogo2.jpg" /></a>  <a href="#"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/footerlogo3.jpg" /></a>
</div>

</body>
</html>

Thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Why not add the page in the wp-admin and click on pages > add ?
 
0
•••
Why not add the page in the wp-admin and click on pages > add ?

That's how it should be, but the client wants some pages to be fully static and not controlled by WP.

I found a way to do it. Here is it:

- For static page links, I pass page IDs that do not exist, something like ?page_id=2000
- Inside page.php, I use a switch to find my IDs 2000+ and include a static page content for each one

Maybe it's not the best, but it works well.

Thanks anyway
 
0
•••
I don't understand why your client don't want to use "add page". It is just so simple and safe (a wordpress backup of the database will ensure that the page will be safe).
 
0
•••
I don't understand why your client don't want to use "add page". It is just so simple and safe (a wordpress backup of the database will ensure that the page will be safe).

you are right, but for some reason the client wants to make things difficult :)
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
NameMaxi - Your Domain Has Buyers
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back