Problematic PHP Navigation Code: [modified]
-
I'm trying to get my wordpress working right. I want to add the Search function, and maybe a Categories function if possible. I was told code_frog or Christian could help me, cause the dabble in WordPress?? http://blogs.wickedorange.com/andrew/ Heres the code which works:
>home Here's the code i added, which doesn't work...* .NET Search
-
I'm trying to get my wordpress working right. I want to add the Search function, and maybe a Categories function if possible. I was told code_frog or Christian could help me, cause the dabble in WordPress?? http://blogs.wickedorange.com/andrew/ Heres the code which works:
>home Here's the code i added, which doesn't work...* .NET Search
AndrewVos wrote:
Here's the code i added, which doesn't work...
What do you mean? What happens when you use that bit of code?
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
-
I'm trying to get my wordpress working right. I want to add the Search function, and maybe a Categories function if possible. I was told code_frog or Christian could help me, cause the dabble in WordPress?? http://blogs.wickedorange.com/andrew/ Heres the code which works:
>home Here's the code i added, which doesn't work...* .NET Search
When I need to do php stuff inside html, I build the string and then echo it.
<?php
$strHtml = "<div id=\"header\"></div>";
$strHtml .= "<div id=\"container\">";
$strHtml .= "<ul id=\"nav\">";
$strHtml .= "<li ";
if (is_home())
{
$strHtml .= "id=\"current\"";
}
$strHtml .= ">"
$strHtml .= get_settings('home');
$strHtml .= " title=\"home\">home</a>";
$strHtml .= "</li>";$strHtml .= "<li>";
$strHtml .= "<a href=\"?paged_id=110\">.NET Search</a>";
$strHtml .= "</li>";
$strHtml .= "</ul>";
$strHtml .= "</div>";echo $strHtml;
?>You also have an extra /ul and were missing a /div...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
When I need to do php stuff inside html, I build the string and then echo it.
<?php
$strHtml = "<div id=\"header\"></div>";
$strHtml .= "<div id=\"container\">";
$strHtml .= "<ul id=\"nav\">";
$strHtml .= "<li ";
if (is_home())
{
$strHtml .= "id=\"current\"";
}
$strHtml .= ">"
$strHtml .= get_settings('home');
$strHtml .= " title=\"home\">home</a>";
$strHtml .= "</li>";$strHtml .= "<li>";
$strHtml .= "<a href=\"?paged_id=110\">.NET Search</a>";
$strHtml .= "</li>";
$strHtml .= "</ul>";
$strHtml .= "</div>";echo $strHtml;
?>You also have an extra /ul and were missing a /div...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
AndrewVos wrote:
Here's the code i added, which doesn't work...
What do you mean? What happens when you use that bit of code?
Trinity: Neo... nobody has ever done this before. Neo: That's why it's going to work.
Well, the .NET Search button doesn't show as selected when on that page. How would I do an If url = someurl in php? Also, what is the link for the search page in wordpress?