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)
-   -   Menu under Header Image on Specific Page (http://forum.bytesforall.com/showthread.php?t=13024)

Cathy131 Feb 27, 2011 04:06 AM

Menu under Header Image on Specific Page
 
Hi there
Well its taken me a day, but I've finally figured out how to create a page that has a different header image and number of sidebars than my homepage.

I have created the Pages listed below (still in Draft) and need to add a menu under the header image of this page only. I do not want these pages to appear in the menu on the left of the page or on any other page in the website.

http://untietheknots.com.au/sewing-guidelines
http://untietheknots.com.au/sewing-links
http://untietheknots.com.au/student-work

So I followed the instructions on here.
I went to ATO > Header Area > Style & edit HEADER AREA > Configure Header Area and changed it to:

%logo <?php
if(function_exists('show_media_header')){
show_media_header();
}
?>
<?php bfa_widget_area('name=dress_submenu'); ?>

The code I created in the dress_submenu widget reads:
<?php

echo*"<div*id=\"menu2\">";
echo*"<ul*class=\"clearfix*rMenu-hor*rMenu\"*id=\"rmenu\">";

$curr_page_id*=*get_query_var('page_id');

switch*($curr_page_id)*{
****case*1199:
********echo*"
<li*class=\"cat-item*cat-item-1\"><a*href=\"http://untietheknots.com.au/sewing-guidelines\">Submenu*Item1*for*Page*1199</a></li>
<li*class=\"cat-item*cat-item-2\"><a*href=\"http://untietheknots.com.au/sewing-links\">Submenu*Item2*for*Page*1199</a></li>
<li*class=\"cat-item*cat-item-3\"><a*href=\"http://untietheknots.com.au/student-work\">Submenu*Item3*for*Page*1199</a></li>
********";
********break;
default:
*******echo*"&nbsp;*";
}
echo*"</ul></div>";
?>

This appears on every page:

DRESSMAKING SUBMENU (greyed out - doesn't go anywhere)


Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/cbc/public_html/untietheknots.com.au/wp-content/plugins/php-code-widget/execphp.php(44) : eval()'d code on line 3

So I have deleted <?php bfa_widget_area('name=dress_submenu'); ?> from the ATO Header Config Page for now. Any ideas on where I've gone wrong or if there is a better/easier way of doing this?

Once I've figured out my menu issue, what do I do, so that I can add 'blog posts' that appear only on this page and students/visitors can add comments to the posts?

Sorry for the long post - hope it makes sense
Cheers
Cathy131

juggledad Feb 27, 2011 04:16 AM

are all those '*' there to represent spaces, or did you actually put them in the code? Ie do you have
HTML Code:

<?php

echo*"<div*id=\"menu2\">";
echo*"<ul*class=\"clearfix*rMenu-hor*rMenu\"*id=\"rmenu\">";

$curr_page_id*=*get_query_var('page_id');

switch*($curr_page_id)*{
****case*1199:
********echo*"
<li*class=\"cat-item*cat-item-1\"><a*href=\"http://untietheknots.com.au/sewing-guidelines\">Submenu*Item1*for*Page*1199</a></li>
<li*class=\"cat-item*cat-item-2\"><a*href=\"http://untietheknots.com.au/sewing-links\">Submenu*Item2*for*Page*1199</a></li>
<li*class=\"cat-item*cat-item-3\"><a*href=\"http://untietheknots.com.au/student-work\">Submenu*Item3*for*Page*1199</a></li>
********";
********break;
default:
*******echo*"&nbsp;*";
}
echo*"</ul></div>";
?>

or
HTML Code:

<?php

echo "<div id=\"menu2\">";
echo "<ul class=\"clearfix rMenu-hor rMenu\" id=\"rmenu\">";

$curr_page_id = get_query_var('page_id');

switch ($curr_page_id) {
    case 1199:
        echo "
<li class=\"cat-item cat-item-1\"><a href=\"http://untietheknots.com.au/sewing-guidelines\">Submenu Item1 for Page 1199</a></li>
<li class=\"cat-item cat-item-2\"><a href=\"http://untietheknots.com.au/sewing-links\">Submenu Item2 for Page 1199</a></li>
<li class=\"cat-item cat-item-3\"><a href=\"http://untietheknots.com.au/student-work\">Submenu Item3 for Page 1199</a></li>
        ";
        break;
default:
      echo "&nbsp; ";
}
echo "</ul></div>";
?>

because the first will not work

Cathy131 Feb 27, 2011 05:25 AM

Hey Juggledad

the * are spaces. Don't know why 'the forum' put them in there......

Double checked the widget itself - not a * to be seen.

Cathy131 Feb 28, 2011 04:22 AM

I got the posts to appear on this page with this plugin.

The posts in Dressmaking category are excluded from my normal blog page with Juggledad's instructions (note the code goes in THE LOOP not above or below it!)

Hoping someone can help with adding a menu under the header image of this page.

juggledad Feb 28, 2011 07:27 AM

I see a menu in the left sidebar of the 'Dressmaking Classes' do you want another menu somewhere?

(p.s. I changed the wording in that other post)

Cathy131 Mar 5, 2011 04:07 AM

Sorry for the delay in responding.

Yes I would prefer Sewing Guidelines, Sewing Links and Student Work to appear as a menu (or clickable links) under the header image on 4 pages - Dressmaking Classes and those mentioned above. They should not appear on the home page, or any other page.

Once I've mastered that, I'll remove them from the left sidebar menu.

Thanks heaps
Cathy


All times are GMT -6. The time now is 02:04 PM.

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