On my directory Submit4Backlinks.com I want the top blurb, We would like to extend a warm welcome to you while visiting our search engine friendly directory. At Submit4Backlinks.com we have many cost effective options for building backlinks for search engine optimization, search engine marketing and promotion of your website. Increasing traffic and getting better search engine position is the goal of many expert webmasters and we would like to help. If you have any comments or are interested in advertising on our directory please email us with the details. Thanks again for visiting our directory. to only show on the home page and not any others, what code do I need to put in there? thanks (and whoever can help me gets a free regular listing)!!
Hard to say without seeing your code. But you could try something like this. <?php if (!isset($_GET)) { ?> Your conetent to show on the main page here <?php } ?> PHP:
Try following code, if(basename($_SERVER['SCRIPT_NAME']) == "./" || basename($_SERVER['SCRIPT_NAME']) == "index.php" || basename($_SERVER['SCRIPT_NAME']) == "index.html") { ?> Your html here <? } ?> PHP:
These codes are correct and will work but may present a problem for those who use dynamic pages, for example, osCommerce uses index.php for categories, homepages and other stuffs, the code above will likely display on all categories, homepages and other pages that are running off the index page. Unless you are using a dynamic page, you can use the script above, else, you might want to assign a trigger on a safe location on your index page, or you can combine the above code, with a $_GET function if you are using variables on your url, so if it is isset and index.php, then the data appears. Hope it helps.
I have no idea why I posted ./ as the condition, that' meant to be the name of the page you want to display the html on, and replace the html I wrote with your html and then it'll only display on the page you replace ./ with. The format of the url really doesn't matter, they are rewrite rules and $_SERVER['SCRIPT_NAME'] is the name of the script being executed, not affected directly by the url of the page being viewed.
I took a look at your directory... since you're using phpLD (good man) I can help. I'm assuming you have your "blurb" in main.tpl ? If so, wrap the "blurb" code in this: main.tpl: {if $category.ID eq 0 and not $p and not $qu} B l u r b C o n t e n t H e r e {/if} Code (markup):