|
|
|
|
|
|
#1
|
||||
|
||||
|
PHP 404 Wordpress HELP?!
Anyone know how I would alter this 404 wordpress template code so it could send hits to a specific url with my affiliate code. Here's the template code (though I'm sure most of you wordpress people already know it by heart). Thanks
<?php get_header(); ?> <?php get_sidebar(); ?> <div class="narrowcolumn"> <?php include(TEMPLATEPATH . '/top-menu.php'); ?> <!-- CONTENT --> <div class="post"> <h2><?php _e('Not Found'); ?></h2> <div class="entry"><?php _e('Sorry, but you are looking for something that isn't here.'); ?></div> </div> <!-- END CONTENT --> </div> <?php get_footer(); ?> I'm looking for the spot to place the url/affiliate code so as not to jack up template and/or make sure the hits get where they are going. Again, thanks
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#2
|
||||
|
||||
|
Hey Porn Punk, just put whatever html you want between the content and end content comments. If you keep the div's and the h2 tags, strip out the php that's between them, and put your html in that area, then you could put whatever message, link codes, etc in there that you want and it should maintain the look of a regular old blog post. Something like:
<!-- CONTENT --> <div class="post"> <h2>Want some hot pussy?</h2> <div class="entry">Sorry we couldn't find what you were looking for. Use the search or hit your back button to try again, or just click here for the best damn pussy you will ever find. link here, text, images, etc. Compelling text with call to action, yada yada yada.</div> </div> <!-- END CONTENT --> Hope that is the answer you needed. How's things on your end? |
|
#3
|
||||
|
||||
|
Quote:
Thanks
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#4
|
||||
|
||||
|
If I get what you are saying correctly, then you could probably copy the contents of header.php, and replace the <?php get_header() ?> call with that code. You should then be able to see your <body> and you could change it to something like
<body onLoad='window.open("URL YOU WANT TO OPEN","NameYourNewWindow","resize=no,sta tus=no")';> That should make a popup window show when your 404 page template loads. This is easily blocked by pop up blockers, though, so I don't know how well it would work for you. Also, I'd double check to make sure it's with the TOS of whatever you are promoting to put their link in a console. Let me know if this helps, or if I'm misunderstanding you at all. |
|
#5
|
||||
|
||||
|
Quote:
What about altering the basic .htaccess that sits in the main directory of wordpress? Can that be altered just to 404 the entire blog to the page I need in the basic old fashioned way, or will you still be stuck in the template? My concern is the hits not reaching the sponser if it doesn't move outside of the template window, and also (as you pointed out) the pop up problem this other way. What code would I need and where would I place it to see if this can be done? This is the basic code by the way I have in mine # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Thanks again
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#6
|
||||
|
||||
|
Well, I'm stuck there. Unfortunately I don't really know crap about .htaccess. Maybe your host would know?
|
|
#7
|
||||
|
||||
|
ErrorDocument 401 http://whatever.com
ErrorDocument 403 http://whatever.com ErrorDocument 404 http://whatever.com Now, could you kindly tell me what ppc sponsor it is that accept 404 traffic? Thx
__________________
Go Fuck Yourself! |
|
#8
|
||||
|
||||
|
Quote:
I'll pm you the sponser, but pretty sure you don't like them. Probably end up skipping this anyway. It was just something extra I was going to try
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#9
|
||||
|
||||
|
Quote:
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#10
|
||||
|
||||
|
Quote:
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
|
#11
|
||||
|
||||
|
Thanks guys.
I'm probably just going to stick with what Odysseus said first and edit the 404 page and let it be a click through after Viking's last comment. Wasn't really considering everything. No big deal - just testing something out and this was a late late after thought Thanks again, both of you
__________________
LINK EXCHANGE PAGE! MY LINK EXCHANGE TRADE PAGE ICQ 278-804-660 smutnut(AT)smutnut.org |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|