lucaslem

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 60 total)
  • Author
    Posts
  • in reply to: Moving secondary nav in Agency Pro #110270

    lucaslem
    Participant

    You’re almost there!

    If you specify genesis_before_header you’re actually putting it inside the header element. What you want to do it place before that so you need to specify genesis_before.

    The code looks like this:

    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_before', 'genesis_do_subnav', 1 );

    One more thing, you will need to tweak the CSS for the header (class= .site-header) as it is set to fixed and your secondary menu is going to be hidden beneath it.

    in reply to: All "entry content" displaying inside "entry header" #107465

    lucaslem
    Participant

    Brad, thank-you for the cleaner code tip! Still learning :)

    Also thanks for the link to your post. This is really great for learning as even though I have been using ACF (which is by all accounts a solid plugin), I always like to know how things are actually built and how they work. May code a few of these boxes by hand following your method for practice :)

    Are you at all involved with WP Mentor? Do you ever do code reviews? Doesn’t hurt to ask, right? ;)

    in reply to: All "entry content" displaying inside "entry header" #107365

    lucaslem
    Participant

    Thanks!

    Actually, it was a bit different because I wanted some of the code to go within the header and some of it after (in entry content)… but the closing header tag was missing because I had added this in my functions file (I wanted to get rid of the post info):

    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
    remove_action( 'genesis_entry_header', 'genesis_post_info' );
    remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 15 );

    As soon as I got rid of the first and third line, I was good: post info gone, markup still there.

    in reply to: All "entry content" displaying inside "entry header" #107357

    lucaslem
    Participant

    Nothing like posting to forum to finally solve the problem on your own!
    So my bad: I had code elsewhere in my functions file to remove the header entry meta for that cpt, and I had also removed the header markup.

    in reply to: All "entry content" displaying inside "entry header" #107350

    lucaslem
    Participant

    FYI the HTML debugging is telling me that there is no closing tag for <header class=”entry-header”>. I’m not messing with any of the theme’s html, so I’m guessing there must be some additional code I need to include in the add_action or in my function.


    lucaslem
    Participant

    Thanks Brad, will definitely check out stackxchange for specific code issues.

    I was asking mainly because I read somewhere that it’s not a good idea to have a very large functions file, though it was never made clear why nor was specified how many lines actually make the file “large”. I find it easier to put my code in functions (even for structural HTML changes) just because I can easily apply that code to (or remove it from) other sections of the site with a quick conditional change.

    I will create templates if they make life easier for clients.

    Good to know the answer is indeed “it depends” and not some hard and fast rule. Cheers.

    in reply to: Moving secondary nav in Agency Pro #103691

    lucaslem
    Participant

    Ok, fixed. In case this helps anyone else I will share that I overlooked the priorities used in this theme for the menu positioning:

    //* Reposition the header
    remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
    remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );
    add_action( ‘genesis_before’, ‘genesis_header_markup_open’, 5 );
    add_action( ‘genesis_before’, ‘genesis_do_header’, 10 );
    add_action( ‘genesis_before’, ‘genesis_header_markup_close’, 15 );

    I just needed to add a higher priority to the secondary navigation menu to make it appear above the header.


    lucaslem
    Participant

    Thanks you guys!
    Dave, yes indeed we have… and many of our exchanges were for this very site. Many many thanks :)

    in reply to: Moving secondary nav in Agency Pro #103311

    lucaslem
    Participant

    I’ve gone ahead and also removed all CSS which affects positioning. No dice; the html is still still the issue here.
    The remove_action works just fine. It’s the add_action which does not seem to be doing anything. Would love any other ideas on this.

    in reply to: Moving secondary nav in Agency Pro #103265

    lucaslem
    Participant

    Hi Lauren,

    The fixed position was my first thought as well, but the HTML is not displaying in the order I would expect from the code I used to reposition the menus.

    Here’s what comes out:

    <header class="site-header" role="banner" itemscope="itemscope" itemtype="http://schema.org/WPHeader">
    	<div class="wrap">
    	<div class="title-area">title stuff here</div>
    	<aside class="widget-area header-widget-area">
    	<section id="nav_menu-2" class="widget widget_nav_menu">
    	<div class="widget-wrap">
    		<nav class="nav-header" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
    			<ul id="menu-navigation" class="menu genesis-nav-menu">
    			Main nav items all listes here
    			</ul>
    		</nav>
    	</div>
    	</section>
    	</aside>
    	</div>
    </header>
    
    <div class="site-container">
    	<nav class="nav-secondary" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
    	<div class="wrap">
    		<ul id="menu-toolbar" class="menu genesis-nav-menu menu-secondary">
    		Secondary nav items listed in here
    		</ul>
    	</div>
    	</nav>
    	
    	<div class="site-inner">
    	
    		ETC...

    As you can see the secondary nav does not get bumped up above the header as I would expect. I downloaded a fresh copy of the theme with demo content to rule out any other customizations errors I may have made, but I get the same result.

    in reply to: Adding list of custom post type to page_archive.php #84256

    lucaslem
    Participant

    Sridhar you’re awesome! This is just what I needed. Combined with custom taxonomy queries in the shortcode, I managed to make the sitemap even better than I had hoped :)

    in reply to: How to overide css #83653

    lucaslem
    Participant

    Glad I could help :)

    in reply to: Adding list of custom post type to page_archive.php #83652

    lucaslem
    Participant

    Sridhar,

    Thank-you for the snippet. It does work in that my custom posts now appear in the general posts lists, but I suppose I should have been more specific: I would like to display the CPT’s in their own list, separate from the blog posts. In other words:

    What I currently have:

    Custom Post Types:
    nothing

    Blog posts:
    — blog post one
    — custom post type one
    — blog post two
    — custom post type two
    and so on

    What I’m trying to achieve:

    Custom Post Types:
    — custom post type one
    — custom post type two
    and so on

    Blog Posts:
    — blog post one
    — blog post two
    and so on

    Thanks for any help :)

    in reply to: How to overide css #83281

    lucaslem
    Participant

    Have you tried:

    background-color: transparent;

    rather than “none” ?

    in reply to: Sass / Scss Version of the Genesis Sample starter child theme #78342

    lucaslem
    Participant

    More of a SASS guy than LESS, but… potato, potatto.

    Also, while I may have only *mentioned* this today, I have searched the forums for many months for hints that this may be in the works… should be more vocal I guess ;)

Viewing 15 posts - 1 through 15 (of 60 total)