Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Breadcrumb in page menu (http://forum.bytesforall.com/showthread.php?t=752)

shedhed Mar 13, 2009 02:23 PM

Breadcrumb in page menu
 
I'm tinkering with changing over my theme to Atahualpa which I think is really "sharp".

One thing I'd like to do is get a breadcrumb into the page menu over on the right hand side.

I currently use the Breadcrumb NavXT plugin which uses a bit of code

Code:

<li class="breadcrumb">You are here &raquo;
<?php if (function_exists('bcn_display'))
{
// Display the breadcrumb
bcn_display();
} ?>
</li>

to do the business.

However, as a php novice*, I don't know where to place this. I've tried it in bfa_header_config.php around line 23 and can get the breadcrumb to work but it always ends up in the top left of the header; not the page menu bar itself.

I'm sorry but I can't refer you to my site as I'm doing the tinkering locally.

Any help would be gratefully received.

Thanks, Andy

*for novice read "dangerous buffoon".

Flynn Mar 13, 2009 03:44 PM

in functions/bfa_header_config.php

change

PHP Code:

 if (strpos($header_items,'%bar1')!==false) {
// Horizontal bar 1
$horizontal_bar1 '<div class="horbar1">&nbsp;</div>';
// END of Horizontal bar 1


to
PHP Code:

if (strpos($header_items,'%bar1')!==false) {
// Horizontal bar 1
$horizontal_bar1 '<div class="horbar1">';
if (
function_exists('bcn_display'))
{
// Display the breadcrumb
ob_start();  bcn_display(); $bcn_display ob_get_contents(); ob_end_clean();
}
 
$horizontal_bar1 .= $bcn_display '</div>';
// END of Horizontal bar 1


Then use %bar1 at A. Theme Options -> Header -> Configure header area

shedhed Mar 14, 2009 04:06 AM

Thanks for your reply.

I tried the code as you suggested and can get the breadcrumb to appear as a separate "line" using one of the header bars and modifying its associated CSS.

What I'm struggling with is how to get this on the same line as the actual header page menu.

I'm trying to achieve something similar to my current site http://www.rhodieridgeback.com where you'll see my horizontal page menu and breadcrumb; the former to the left and the latter to the right.

Thanks in advance for any help.


Andy

shedhed Mar 15, 2009 03:24 PM

Flynn,

I've tinkered with the code in your answer and put this in bfa_header_config.php at line 23

Code:

if (function_exists('bcn_display'))
$page_menu_bar .= '<li class="breadcrumb">You are here &raquo;';
{
// Display the breadcrumb
ob_start();  bcn_display(); $bcn_display = ob_get_contents(); ob_end_clean();
}
$page_menu_bar .= $bcn_display ;
$page_menu_bar .= '</li></ul></div>' . "\n";
// END of Page Menu Bar
}

That seems to get the breadcrumb in the page menu bar - I just need to do some styling to get it to display correctly; with my css "skills" that'll be another week!

Any comments on what I've done more than welcome.

Andy

Maartendegroot Jul 5, 2012 07:10 AM

Quote:

Originally Posted by Flynn (Post 2986)
PHP Code:

 if (strpos($header_items,'%bar1')!==false) {
// Horizontal bar 1
$horizontal_bar1 '<div class="horbar1">&nbsp;</div>';
// END of Horizontal bar 1


to
PHP Code:

if (strpos($header_items,'%bar1')!==false) {
// Horizontal bar 1
$horizontal_bar1 '<div class="horbar1">';
if (
function_exists('bcn_display'))
{
// Display the breadcrumb
ob_start();  bcn_display(); $bcn_display ob_get_contents(); ob_end_clean();
}
 
$horizontal_bar1 .= $bcn_display '</div>';
// END of Horizontal bar 1


Then use %bar1 at A. Theme Options -> Header -> Configure header area

This does work properly. However, is there any way to ´hard code´ program this in the theme i.e. insert a css code in the ´add html-css inserts´ section in such a way you don't have to re-do this steps every time an update comes out?

I have tried myself, but I couldn't figure it out.

juggledad Jul 5, 2012 12:50 PM

I would add a new widget area to the 'Configure header area' option
HTML Code:

<?php bfa_widget_area('name=breadcrumb widget area'); ?>
find a good breadcrum plugin
add the plugin's widget to the new widget area.

Now it is a theme option and will remain thru updates.

Ber|Art Nov 28, 2013 09:41 AM

Thx! this works great :)


All times are GMT -6. The time now is 11:50 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.