I am trying to set up my template in wordpress but I need to make it so that the posts HTML code isn't entered the same as on the home page on the permalink page. I am trying to say only show this HTML code if the URL isn't for a permalink page. Here is a sample URL: http://mysite.com/2007/08/20/post-name/ Here is the code I am using: <?php if (!preg_match("#^(/[.*]+/[.*]+/[.*]+/[.*]+/)$#", $_SERVER['REQUEST_URI'])) : ?> // HTML code here <?php endif; ?> PHP: Please help.
<?php $_URL = $_SERVER['REQUEST_URI']; if (substr($_URL,(strlen($_URL)-1),1)!="/") echo "Not Permalink!"; // HTML code here ?> PHP: I don't know PHP so bare with me. I'm trying my best.
if (!preg_match('/20\d{2}\/[01][0-9]\/[0-3][0-9]\//', $_SERVER['REQUEST_URI'])) PHP: This should do it.