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

Get keys and values from an array
Hellow,

I have an array $Data with keys and values. With a foreach I can display all the valu

[Need Help] php timing issues
I don't know what is going wrong. I need some help with being able to set an image at 9:00am Colorad

If statement help please.
Hello on my site I have 2 content boxes. 1 is for the main content (which is the biggest one) and th

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

PHP MySQL Return Results Issue
Hi guys,

I'm running joomla and made a module which is using ajax.
Basically i just have a

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

Data storage spaces in varchar2
Trying to understand what's happening.
I am selecting a value from a table that is defined as c

PHP error on MySQL insert
I'm sure it's the simplest of issues, but I can't recall why this isn't working.

Code: [Selec

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

Warning: mysql_num_rows() supplied argument is not a valid MySQL result resource
This may be simple I just may need another pair of eyes..

When i get records back the below c

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