PHP If Else statement for breadcrumb


Posted on 16th Feb 2014 07:03 pm by admin

Hi

I am trying to use a PHP if else statement to display a breadcrumb link on wordpress

The code

Line number On/Off | Expand/Contract <div class="triple silhouette_break"> <ul> <li><a href="/">HOME</a> &raquo;</li><? $t=$_SERVER['REQUEST_URI']; if ($t == "/blog/")?><li><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('name'); ?>" class="current">BLOG</a> &raquo;</li><? else ?> <li><a href="<?php bloginfo('url'); ?>/" title="<?php bloginfo('name'); ?>">BLOG</a> &raquo;</li> <li><a href="<?php $t ?>" class="current"><?php wp_title('&laquo;', true, 'right'); ?></a></li> </ul> </div>

If the user is on "/blog" or "/blog/" folder then I only want to display >> BLOG and if they are on anything else inside that folder I want to display the URL they are on and the crumb

No comments posted yet

Your Answer:

Login to answer
260 Like 10 Dislike
Previous forums Next forums
Other forums

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built

Calling strings from other php class
I have test1.php{
$string1;
$string2;
....
... //10 strings in this class <

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

Print out contents of to Excel
I have got this script that gathers all the data that I need but I need it to send it to excel inste

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

SESSION question
I am building an application , a directory for auctions.
For SEO i made a script which copies a p

"GROUP BY" in arrays
Well i'm looking to do something i usually could do easily using COUNT and GROUP BY if it was a sql

do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash