Forum Replies Created
-
AuthorPosts
-
boldplan
ParticipantHere is what I did that works, putting it into the Additional CSS box. This differs from instruction I have seen but seems preferable.
.genesis-nav-menu {
color: silver;
background-color: black;
}.genesis-nav-menu a {
color: gold;
}.genesis-nav-menu a:hover {
color: black;
background-color: gold;
}boldplan
ParticipantContacted the author. Went through a couple of rounds of "first level support" to explain that it's not a css issue, not a control panel issue, etc. They are contacting "the programmers" to figure out why it's not removing that portion.
I always thought something like this would be in the standard Genesis control panel, as would be the footer placements which probably make it very tough for amateurs to do something as simple as editing the footer entries and links.
boldplan
ParticipantI honestly can't remember how I accomplished this in genesis but I will say this much - brad dalton provides a great deal of help around here, just giving credit where it's due. In fact, he even gives a response as to how it can be accomplished most easily by simply mimicking another template, which I'll look at.
I'll see if I can figure out how I did this, perhaps with a plugin. I really like genesis but it does make a number of the simple things excruciatingly convoluted. I miss the days of a template where you can visualize and customize more easily. I believe I did it like this. If you like it and it works, thank my website. 😉
taxonomy-slugname-sectionname.php
<?php /*
Template Name: TheLaw.com
*/ ?><?php
add_filter ( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
add_action('genesis_before_loop', 'archive_do_post_title');
function archive_do_post_title() {if ( is_category() || is_archive() ) {
echo '<h1>Title Here</h1><div class="entry-content">Stuff here.';
echo category_description(1234) . '</div>';
}
}genesis(); ?>
boldplan
ParticipantI see the option to remove these: For others:
Goto Genesis > Seo Settings option and then uncheck “Use semantic HTML5 page and section headings throughout site?“. Keep the “Site Title” option selected and click Save Changes button. Once you do this, your HTML5 theme will generate only one h1 tag for the post title in single post pages and site title on the homepage.
boldplan
ParticipantDavinder - Thanks. I was about to come back here and post that this was the plugin that I eventually found while confirming that using the old function code for WordPress should still work for Genesis. It seemed to work even though there are two parts to the Agency theme. Thanks for following up!
boldplan
ParticipantFigured it out. Slight conflict with my replacement top nav and .genesis-nav-menu a controls the padding. Love it when you solve your own problems and hopefully someone else will when they are done out loud, lol.
boldplan
ParticipantOK - I was able to determine a subtle differentiation. Not sure whether this is the right way to do it but .sidebar .widget padding can be extended to offset the vertical reduction in padding of the above. Hope this helps someone else. Last question is the height of the second level menu. Will post my answer to help others if I discover it soon. 🙂
boldplan
ParticipantThe other challenge I'm having is reducing the height of the second level menu from the 64px that it is set at. Not so simple to find it even inspecting the elements.
boldplan
ParticipantThanks guys - I really appreciate the brutal details. I'm getting a better understanding of where you're coming from. I'll probably end up hiring someone for the more ambitious work shortly.
Gary - truly appreciated your very detailed explanation. I guess that my discomfort is that fine tuning areas is not easy to manage in a functions.php and I hate adding yet more plugins -- but it's probably the only practical solution. I run a very large Genesis based multisite which has about a dozen multisites because it's the only practical way to manage content areas, e.g. professional journal, the student journal and company blog, etc. With template files It's much easier for me to see how all blogs are treated as they are in one template and reading is linear. Functions are difficult to visualize and would require some real organization. I want to also insert a form on the bottom of every post in some but not all multisites (I guess is genesis_after_content). I also want to insert a form which includes some php and javascript to be executed. I guess that with Genesis, it's made far more for coders and not hackers and I'll need to reenter my coding days to learn all the syntax and deal with the learning curve.
Yes, there are advantages if you can place once and have it serve everywhere. I guess no one size fits all and I'll have to take the pros with the cons! Thanks again for your patience. I can't tell you how much I appreciate both of your assistance.
boldplan
ParticipantGary - many thanks on your detailed and honest responses. It's refreshing and why I like this place. 🙂
I don't see any heading option available in the theme or an SEO settings box. I'm using Magazine Pro with my own custom styling but nothing affecting the header tags. I'm also using WordPress SEO FWIW, which I don't believe messes with the overall general header tags and it's mostly done for managing indexing of pages, handling post excerpts and meta descriptions.
Regarding the headings -- many thanks for the info and glad they are looking into this. I discovered it after seeing my traffic decline somewhat after switching themes. I've now modified my own elements to "fake" them at times, e.g. using headers inside of text boxes rather than using the block titles. I can have my titles appear as h2 or h3 or just strong for semantic markup. I'm also using conditional widgets on the home page so that I can align everything perfectly there and then have the rest of the site be less affected, e.g. a stray h4 in the sidebar rather than the middle of the page as it is now on home pages. Overall, using Genesis has been a major plus.
boldplan
ParticipantThanks for the response Gary. I've looked closer at the themes and see multiple H1 tags in the demos. I don't remember how this was changed in my themes or whether I did that myself. This is not good at all. It looks like the H1 is the attached to the logo/site name and the H2 to the site slogan. And then there is another H1 tag for the author box. I'm not sure how to address this but it certainly doesn't appear optimal.
I'm familiar to some degree with filtering but could you confirm with me the right way to do this filter. I don't want to make a mistake here and guessing won't serve well by having it substitute out H4 tags when I really need them. 🙂 I think that this would probably be an H4 as it relates to the sidebar, which I believe is what sets all the block titles in the Magazine theme. Thanks again.
boldplan
ParticipantThanks -- ah yes, that's right.... you have to filter everything out and replace, sort of like glorified find/replace. And while this works, I can't get the modification to only appear on the home page of a certain blog properly. I've been using the standard codex conditions, (is_single(), !is_home(), !is_front_page() ) but the front page no longer displays the title at all although it does appear modified on post pages. The back ending into these things makes it a huge pain to work with and a visual nightmare to read templates and edit. It's like spaghetti templates, especially if you want to find later where things are.
While it may be a few milliseconds for each function, they add up very quickly. I already have almost 3 dozen modifications and a functions.php file that is 500 lines and growing. Add in multiple users accessing the site and this adds up significantly. Honestly, I don't think this is trivial and can easily add a half second to page load for every user.
boldplan
ParticipantKelly - thanks. I've seen extender and it adds a lot of functionality. But I don't think it replaces the content, just puts in a content area into a hook area. This is key.
Of note, I think it works the same way as all the other plugins. It creates unnecessary functions rather than having a template created that needs to "erase" what was previously stated. For the most part, most of these plugins merely add the functions.php code through a more manageable in a plugin. So instead of creating a simple function to say "echo this content in this hook area", the plugin does that for you.
boldplan
ParticipantThanks for the detailed replies:
(1) Yes, I'm aware of the Simple Edits plugin. But it's actually just a way to insert functions into functions.php without having to copy and paste. It's convenience and unnecessarily adds to the load time in the same manner.
(2) The issue isn't an action hook - it's a lack of being able to gain access to the variables themselves to custom code. Almost all the Genesis themes, as a result, look the same way. For example, on my single.php or post file I want the header to look like this:
<h1>Thoughts on <title here> by John</h1>
I don't think there is a way to do this properly using hooks and probably best to just make a template edit which results in no need for back ending your way into these edits. In addition, instead of "leave a reply" before the comment fields I'd like to insert a form and something else in there, but I don't see an easy way to accomplish this since the form isn't there and, again, would involve inserting code that exists in some other file and using it as some type of an include. I don't recall seeing a tutorial or information about this either.
boldplan
ParticipantAnother issue - I want to remove the date from the template. This too needs to be handled by another Genesis function. As a result, you end up with a multitude of functions to do what a simple template would with far greater efficiency. I'm a little stuck on why I'm preferring to use the system and wondering as to the best way to simply template things again like single.php etc.
boldplan
ParticipantThanks for the detailed reply.
Regarding the suggestions of the way things are handled - I agree with you regarding the wondering why it's always "edit your functions.php file." For example - I need to revise my footer so it appears the way it should. Right now in order to get rid of accreditation or to change it, e.g. powered by Genesis or whatever was there, the solution was to put it into functions.php. This seems to be incredibly inefficient. The same goes for every little ticky-tack change you need to make, e.g. You Are Here in searches, etc. It's always yet another function to add rather than making changes in template files or directly to PHP files.
So now the question becomes, what do I do next in Genesis to create a custom footer template? If you look at the Genesis parent, the footer.php is as follows:
<em>genesis_structural_wrap( 'site-inner', 'close' ); echo '</div>'; //* end .site-inner or #inner do_action( 'genesis_before_footer' ); do_action( 'genesis_footer' ); do_action( 'genesis_after_footer' ); echo '</div>'; //* end .site-container or #wrap do_action( 'genesis_after' ); wp_footer(); //* we need this for plugins ?> </body> </html></em>
So... how does one create a template, e.g. a customized formatted footer area, and not mess up everything else? This would definitely be preferable.
PS - Yes, weird stuff was happening with your posts!
boldplan
ParticipantFinally got it to work. I had to put it after header I believe. I used Simple Genesis Hooks plugin - something like that - and then was able to infer what needed to be done in function form. For some reason, using what appears to be almost identical code (changing the function) and putting it in the right hook did the job. Thanks for the help along the way.
boldplan
ParticipantI tried a fresh install of the Magazine theme. I used the above code and pasted it into the functions.php at the bottom to make sure it was the last function processed. Didn't matter where I put it - the code never echoed to the screen, neither the PHP nor the HTML. I told you, replacing the top nav with my own was not easy! :/
add_action( ‘genesis_header’, ‘yourprefix_add_secondary_menu’, 20 );
function yourprefix_add_secondary_menu() {
echo "BLAH BLAH BLAH";?>
or your markup here
<?php
}boldplan
ParticipantThanks for the help, truly. It's definitely the right child theme as screwing it up once confirmed with a nice white screen and error. 🙂 I even tried putting it in different places using the Visual Hook Guide and the text just doesn't seem to appear, even in the source code. It's why I'm asking the question here. From what I can see, this should do the trick, as is. Maybe I'm missing something. Maybe one of the parameters is incorrect? This is what frustrates me with Genesis themes - the incredibly simple becomes an exercise in backending your way into a theme.
// Add TOP NAV DROPDOWN MENU
add_action( ‘genesis_before_content’, ‘yourprefix_add_secondary_menu’, 20 );
function yourprefix_add_secondary_menu() {
echo "Please work testing code!";?>
<h3>Please work testing code!</h3>
<?php
}boldplan
ParticipantJon - Thanks and good idea. I tried the following but don't see the text echoed to the screen either from the PHP or the HTML markup on the Magazine Pro theme. Theoretically it should work on any Genesis theme.
// Add TOP NAV DROPDOWN MENU
add_action( ‘genesis_header’, ‘yourprefix_add_secondary_menu’, 20 );
function yourprefix_add_secondary_menu() {
echo "your php code here";?>
<h3>or your markup here</h3>
<?php
} -
AuthorPosts