Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   add widget between header image and logo area (http://forum.bytesforall.com/showthread.php?t=15636)

d124c0 Oct 12, 2011 08:12 PM

add widget between header image and logo area
 
The widget goes above the logo area everytime. I have the widget area code replacing the menu.

Then in the atahualpa options for header I have it %logo %pages %image

It still goes to the top. any suggestions?

juggledad Oct 12, 2011 09:05 PM

Where did you put he widget code?

d124c0 Oct 13, 2011 04:41 AM

i put it in replace of the %pages menu for the old style and I checked to make sure it is blanked in the wordpress menu manager.

It now looks like this.
Code:

                // Old custom Atahualpa menu system:               
                else
                {
                echo '<table><td><tr>';
                bfa_widget_area('name=Menu Widget Only');
                echo '</td></tr></table>';
                }

I am not going to be using the old menu system anyways that is why I didn't go through the trouble of using if function exist and such.

juggledad Oct 13, 2011 05:19 AM

did you put this in an option or edit the theme code? if you edited the code, which module?

d124c0 Oct 13, 2011 05:58 AM

I edited the theme code. In bfa_header_config.php

full code for the part I editted is the %pages check

Code:

// Page Menu Bar
        if ( strpos($header_items,'%pages') !== FALSE OR strpos($header_items,'%page-center') !== FALSE
        OR strpos($header_items,'%page-right') !== FALSE ) {



                // Since 3.5.2: New WP 3 menu system:
                if ( function_exists('wp_nav_menu') AND has_nav_menu('menu1') )
                {
                        if ( strpos($header_items,'%pages') !== FALSE )
                                $alignment = "left";
                        elseif ( strpos($header_items,'%page-center') !== FALSE )
                                $alignment = "center";
                        else
                                $alignment = "right";
                        $page_menu_bar = bfa_new_wp3_menus("menu1", $alignment );
                }

                // Old custom Atahualpa menu system:               
                else
                {
                echo '<table><td><tr>';
                bfa_widget_area('name=Menu Widget Only');
                echo '</td></tr></table>';
                }


        }


juggledad Oct 13, 2011 07:34 AM

You don't need to edit the code, you can put the code to create a new widget area right in the 'Configure Header Area' option. It is one place you can do it because the theme knows enough to parse the php for that function.

d124c0 Oct 13, 2011 09:57 AM

ohhh I just remember hearing php couldnt be placed in options now. So I assumed everywhere.


EDIT:
ok so i added this to the header options
%logo <?PHP bfa_widget_area('name=Menu Widget Only'); if(is_home()){ ?> %image <?PHP }?>

The widget doesnt show up at all now. any suggestions?

juggledad Oct 13, 2011 12:44 PM

you can't use the is_home, just the new widget code. so this won't work
HTML Code:

%logo <?PHP bfa_widget_area('name=Menu Widget Only'); if(is_home()){ ?> %image <?PHP }?>
but this will
HTML Code:

%logo <?PHP bfa_widget_area('name=Menu Widget Only'); ?> %image


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

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