Archived topic
secundary navigation position
8 replies · Started by Jonathan on October 24, 2015
Como hago para que el secundary navigation quede en el left sidebar pero debajo de otros widgets?
How do I get secundary navigation stay in left sidebar but down of others widgets ?
por favor ayuda.
If you want to place it below all of the widgets, you can add this code: https://gist.github.com/generatepress/684a063c2423266de7e7
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
Let me know if you need more info :)
thanks for your comment Tom, but I need than secundary navigation stay in left sidebar between somes widgets.
I use your code but The secundary navigation stay in the end position, below all of the widgets, and I need than secundary navigation stay in left sidebar between somes widgets.
Help me please!
Not 100% sure this will work, but you can try creating a shortcode for the secondary navigation:
function generate_secondary_navigation_shortcode() {
if ( function_exists( 'generate_secondary_navigation_position' ) ) :
ob_start();
generate_secondary_navigation_position();
$output_string = ob_get_contents();
ob_end_clean();
return $output_string;
endif;
}
add_shortcode( 'generate_secondary_navigation', 'generate_secondary_navigation_shortcode' );
Then use this shortcode in a regular text widget: [generate_secondary_navigation]
Not sure it will work, and will most likely need a little CSS, but it should get you started :)
Hello Tom
I put the code in the file Functions.php and after I use the shortcode in a regular text widget but in the page is not displayed anything, There's something wrong I 'm doing it, help me please .
You can tell me how can I do this? Thanks.
Hi Tom
I was testing and secondary menu appeared , but appears twice , which normally should appear on top of all the widgets and the other in the position of the text widget . How I can remove the secondary menu on top of the widget ?
Another mistake:
The menu of the text widget not appear below the title of the widget. The secondary menu appears above the title and outside of the container box . How can i fix this? Thank you.
Can you link me to the site so I can take a look?
Hi Tom.
At the moment the website is under maintenance. But I send you some pictures so you can see the comments in the previous post .
Look at: https://dl.dropboxusercontent.com/u/7108205/vista%203.png
This is the widget text and Look at the title and check where it is on the website .
It is below of the secundary menu.
https://dl.dropboxusercontent.com/u/7108205/0013.jpg
Here I paste the code in the file Functions.php
Look at: https://dl.dropboxusercontent.com/u/7108205/0014.jpg
I want to remove the secundary menu which is in the top all of the widgets.
And the title of the widget text is above of the secundary menu.
How can I do that?
Help me please.
I updated the code above which should fix the title thing: https://generatepress.com/forums/topic/secundary-navigation-position/#post-147596
This CSS will remove the standard nav and then display the widget nav:
.secondary-navigation {
display: none;
}
.widget_text .secondary-navigation {
display: block;
}
