General Community > Off-Topic

how would i add this into a page

(1/2) > >>

peachey:
i want to inculde this into my page in the row under the "lastest News:"
the code i want:

--- Code: ---<!--P
$number=1;
$category=1;
include("/home/peachey/public_html/cutenews/show_news.php");
-->
--- End code ---

and my current page is this:

--- Code: ---<p><table style="WIDTH: 100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><p align="center"><font size="5"><strong>Welcome to the <em>Hut Of Peachey</em>.</strong></font></p></td></tr><tr><td></td></tr><tr><td><strong><u>Latest News:</u></strong></td></tr><tr><td>td></tr></tbody></table></p>

--- End code ---

peachey:
the code is php btw

ruebenwurzel:
Hello,

sorry for not answering. I don't understand exactly what you wanna do with this code. Can you please explain what result you wanna have on your page.

Matthias

peachey:
it displays the cutenews output into a page (sort of like an iframe)

ruebenwurzel:
Aaaaah,

now i understand. Ok there are different abilitys.

1. You wanna have the news only on one page
Go in WB admin interface to the edit page section and the page where you wanna have the news. On top right you see "manage section". Go to this and add a code section. Insert in this code section the php code without "<?php" at the beginning and "?>" at the end. The code should look like the one you posted
Didn't work on my test enviroment

2. You wanna have the news on every page at the same place (header or footer or wherever).
Edit the index.php of your template and the code where you wanna have it. From your example it should the look like

--- Code: ---<td>
     <strong><u>Latest News:</u></strong>
     <?php
     <!--P
     $number=1;
     $category=1;
     include("cutenews/show_news.php");
     -->
     ?>
</td>
--- End code ---

Not tested but it should work

Matthias

Navigation

[0] Message Index

[#] Next page

Go to full version