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

Did you know?Explore Trending and Topic pages for more stories like this.
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

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from

Problem with coding MySQL query
I'm having heaps of trouble getting one of my PHP/MySQL queries to work for some reason (and the fun

Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...

I've found out that I nee

Looking for help on using joining mysql tables and php....
Does anyone have any good links to references on how to pull mysql data, through joining tables and

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48

how do i make a string??
hey guys,
can someone please tell me how to put data from the glob function into a string

Auto install
Hi I have a directory lets say "apps" that I then have more folders ie "email",

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