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)
-   -   [SOLVED] How to Hard Code Links into Cat Menu (http://forum.bytesforall.com/showthread.php?t=7886)

agcoco Jul 1, 2010 10:52 AM

[SOLVED] How to Hard Code Links into Cat Menu
 
I'm attempting to hard code a link into the cat menu. I seached the forum, found what I thought was the proper way to do this, but failed.

Would some please tell me the correct way to do this? Here's what I did:

In bfa_header_config.php I added:

// Category Menu Bar
if ( strpos($header_items,'%cats') !== FALSE OR strpos($header_items,'%cat-center') !== FALSE
OR strpos($header_items,'%cat-right') !== FALSE ) {

ob_start();

echo '<div id="menu2">';

if ( strpos($header_items,"%cat-right") !== FALSE ) {
echo '<ul id="rmenu" class="dropdown clearfix rMenu-hor rMenu-hRight rMenu">' . "\n";
} elseif ( strpos($header_items,"%cat-center") !== FALSE ) {
echo '<table cellpadding="0" cellspacing="0" style="margin: 0 auto"><tr><td align="center">
<ul id="rmenu" class="clearfix rMenu-hor rMenu">' . "\n";
} else {
echo '<ul id="rmenu" class="clearfix rMenu-hor rMenu">' . "\n";
}

// Home Link?

$cat_menu_bar .= '<li><a href="http://crucerosislas.net/galeria-de-videos/">
Galeria de Videos</a></li>';

if ( $bfa_ata['home_cat_menu_bar'] != '' ) {
echo '<li class="cat-item';
if ( function_exists('is_front_page') ) {
if ( is_front_page() OR is_home() ) {
echo ' current-cat';
}
} elseif ( is_home() ) {
echo ' current-cat';
}
echo '"><a href="'; bloginfo('url'); echo '/" title="'; bloginfo('name'); echo '">' .
$bfa_ata['home_cat_menu_bar'] . '</a></li>' . "\n";
}

juggledad Jul 1, 2010 10:59 AM

change
HTML Code:

$cat_menu_bar .= '<li><a href="http://crucerosislas.net/galeria-de-videos/">
Galeria de Videos</a></li>';

to
HTML Code:

echo '<li><a href="http://crucerosislas.net/galeria-de-videos/">
Galeria de Videos</a></li>';


agcoco Jul 1, 2010 02:35 PM

Hours of frustration solved with just a few lines of correct code. Thank you, thank you, thank you for sharing your knowledge and quick reply.


All times are GMT -6. The time now is 09:51 AM.

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