Forum Replies Created
-
AuthorPosts
-
dekraan
ParticipantProblem solved. By simply removing the following php-code:
//* Add even/odd post class add_filter( 'post_class', 'gd_grid_post_class' );
dekraan
ParticipantHi Baz, thanks for the link.
Wow, that's a very expensive membership site, for just one article! But, I'll consider it 🙂
There's one over here as well:
Although that's the same kind of payment model :s
dekraan
ParticipantI'll give that a shot, thank you @braddalton!
I know it is not handy to ask a question within a question, but it feels related:
I am using a secondary menu in the above header location, and 2 custom menu's in the right header widget area - the button there is a seperate 'menu'.
Is there a way to get all these menu's inside my responsive menu? At the moment, the secondary menu does not go there automatically.
I do know, that when I had my primary menu in the same above header location it did move inside the hamburger menu...
dekraan
ParticipantFantastic @braddalton, that's just what I needed!
Thanks!
dekraan
ParticipantHi @braddalton,
sorry, I keep forgetting to add that. I am using the Parallax Pro theme! And somewhere along the line, that word 'menu' appeared.
April 4, 2017 at 8:37 am in reply to: Moving your Primary/Secondary menu to a new section in the Parallax Pro theme #204272dekraan
ParticipantHi Victor,
OK! I took a rigorous step, and removed the following line from my functions.php:
add_action( 'genesis_footer', 'genesis_do_subnav', 7 );
It was underneath the following note:
// Reposition the secondary navigation menu.
And it worked!
(I have to explain: I changed my site a little, so it was now not the primary menu, but the secondary menu that was above the header. But that also appeared in the footer, so needed to get it away from there)
Thanks for looking into this with me 🙂
April 4, 2017 at 7:02 am in reply to: Moving your Primary/Secondary menu to a new section in the Parallax Pro theme #204270dekraan
ParticipantHi @victorfont,
I think I might have explained it incorrectly then. I am using a custom menu in the header right area, but I also see a menu just above the site title myself.
That one needs to go, since I also moved it to the top of the website.
So, I want to remove the 'black bar menu' that is right above the title 'Direct beginnen'.
dekraan
ParticipantHi @braddalton,
I've got it figured out, using firebug. I added the following to my CSS and it works like a charm now 🙂
.utility-bar section {
display: inline-block;
vertical-align: top;
}Not sure why this works yet, but I like the end result. Only some styling required now. Thanks a lot for your help!
dekraan
ParticipantHi @braddalton,
At the moment I've got it in the utility bar right section, together with the secondary menu. But then it screwes up my header Heights and positions the search box underneath the utility bar.
dekraan
ParticipantHi @braddalton,
Ah, ok! I did not know that you can't just put widgets in every section.
I want to add it to my 'utility-bar-right' section, which is positioned above the header like this:
add_action( 'genesis_before_header', 'utility_bar' );
/**
* Add utility bar above header.
*
* @author Carrie Dils
* @copyright Copyright (c) 2013, Carrie Dils
* @license GPL-2.0+
*/
function utility_bar() {echo '<div class="utility-bar"><div class="wrap">';
genesis_widget_area( 'utility-bar-left', array(
'before' => '<div class="utility-bar-left">',
'after' => '</div>',
) );genesis_widget_area( 'utility-bar-right', array(
'before' => '<div class="utility-bar-right">',
'after' => '</div>',
) );echo '</div></div>';
}
I just copy pasted this from the Carrie Dils blog. But it should be in the right bar. Do I need to add something to my code in order to make this section 'search form proof'? And what?
dekraan
ParticipantPS: if you need to see something else code wise or else, just let me know. I want to help any way I can to try to find out what's going (wr)on(g).
dekraan
ParticipantHi @braddalton,
Fixed that, but it does not seem to change anything. This is what I have in my functions.php file right now:
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
/**
* Filter menu items, appending either a search form or today's date.
*
* @param string $menu HTML string of list items.
* @param stdClass $args Menu arguments.
*
* @return string Amended HTML string of list items.
*/
function theme_menu_extras( $menu, $args ) {
//* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
if ( 'secondary' !== $args->theme_location )
return $menu;
//* Uncomment this block to add a search form to the navigation menuob_start();
get_search_form();
$search = ob_get_clean();
$menu .= '<li class="right search">' . $search . '';//* Uncomment this block to add the date to the navigation menu
/*
$menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';
*/
return $menu;
}dekraan
ParticipantHi @braddalton,
it's the Parallax Pro theme!
I'm totally confused about it. I did this (I think): add the code from the nav extra post to my functions.php, uncommented both items and changed primary to secondary.
Then, in the utility-bar-right section (above the header), I added a menu widget where I selected 'Secondary menu'.
I've also added the search widget to the same section. I think that is the one that is invisible. No idea what the snippet I added to functions.php does.
Did I miss a step? Is it a css problem? Or something else?
dekraan
ParticipantHi @braddalton,
the form is there when I inspect the html (sorry for my lousy copy and pasting skills), but as you noticed as well, it is not showing up.
<div class="utility-bar">
<div class="wrap"><div class="utility-bar-right">
<section id="nav_menu-3" class="widget widget_nav_menu">
<div class="widget-wrap">
<div class="menu-secondary-navigation-container">
<ul id="menu-secondary-navigation" class="menu">
<li id="menu-item-1929" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1929">Wat houdt tekstcorrectie in?
</div></div></section>
<section id="search-3" class="widget widget_search"><div class="widget-wrap"><form class="search-form" itemprop="potentialAction" itemscope="" itemtype="http://schema.org/SearchAction" method="get" action="http://www.corrector.nl/" role="search"><meta itemprop="target" content="http://www.corrector.nl/?s={s}"><label class="search-form-label screen-reader-text" for="searchform-58e0108c4c3ed">Zoek op deze website</label><input itemprop="query-input" type="search" name="s" id="searchform-58e0108c4c3ed" placeholder="Zoek op deze website …"><input type="submit" value="Zoek"></form></div></section>
</div></div></div>As for the CSS, I don't think I changed anything. Might have given the search-form a 50% width. And this one came with the utility-bar from Carrie Dils' code:
.utility-bar input[type="search"] {
background: inherit;
padding: 10px 0 0;
padding: 1.0rem 0 0;
}dekraan
ParticipantHi @braddalton,
thank you for checking on me.
I have the code live, if everything went well. But I can't figure out how to change the css.
My site is live here:
http://www.corrector.nlthe search form is there, but is being displayed below the utility-bar-right.
dekraan
ParticipantHi @braddalton,
adding it to the header right widget area doesn't work for my design unfortunately.
Do you know how to modify the code I linked to? Changing the CSS is probably something I could do, but php is not one of my skills...
I am using the parallax pro theme.
I am not even sure what should happen if I add the code above to my functions file. Does a search box appear out of the blue, do I have to add something still? And how should I change it to match my current set up?
Hope you can lend a hand!
dekraan
ParticipantThanks Victor! So my problem was basically a matter of adding css to re-create the effect studiopress has on their responsive menu (the white 'pop-up' menu).
Great site by the way!
dekraan
ParticipantHi Victor,
oops! That explains why I sometimes do not get any replies...!
I'm current working on parallax pro. And I might have gotten it to work (some little problems to solve left..) by bluntly copying CSS into my theme.
Have a look here: Corrector.nl. Did i do this right?
dekraan
ParticipantThis reply has been marked as private.dekraan
ParticipantThis reply has been marked as private. -
AuthorPosts