Forum Replies Created
-
AuthorPosts
-
ramseypMember
Hey there,
Looking at the style.css file, I see a typo in there that appears to be breaking everything after it.
Look down the style sheet till you see this:
#contact { width:30%; height:auto; {
I think you want to replace that with:
#contact { width:30%; height:auto; } }
That will close out the declaration for
#contact
, as well as the @media breakpoint for 1180px. Try that and see how it goes.
ramseypMemberHi there.
You can absolutely edit your child theme to do what you want. The major difference will be, however, becoming comfortable with two concepts:
1) The abstraction in Genesis theme code, as opposed to other themes, especially stand-alone themes.
2) How WordPress child themes use template files in relation to the parent theme.First, the abstraction.
Let's say you're in something like TwentyEleven. There you might have an page.php file, withget_header()
at the top, a loop, with the HTML tags mixed in there, and thenget_footer()
at the bottom. The same is true for index.php, single.php, etc.Genesis has a single primary function that's at the bottom of each page/post template:
genesis();
This function runs, loading up all the pieces necessary to build what ever page you're viewing. All these pieces can be modified to some degree by you writing a custom function and either adding it to an action or filter, or by replacing a default function with one of your own. You can find lots of examples in the My StudioPress part of this site, on various blogs, or throughout Github.Child theme template files
With child themes, you don't have to have every template file present. You can let WordPress use template files instead. My personal rule of thumb is to have as few template files in my child theme as I can get away with. WordPress will use a child theme's template instead of the parent's template ( of the same name ) if it's present in the child theme directory. The one exception isfunctions.php
. The parent'sfunctions.php
will always be loaded, in addition to the child theme's.So -
You can override or custom a piece of functionality, or how something looks by writing a function to do so and add it to an action or filter. You'd place this code in your child theme's
functions.php
, or, if you need to isolate your customizations to a particular type of content, you could create the necessary template file in your theme's directory - your code being written in that template file - as long as the last thing in your template file is:genesis();
Does that help? I hope I didn't go either way over your head or way under.
ramseypMemberThe alt attribute's default purpose is to provide a place to describe, in text and briefly, what the image is. Beyond that, you can do a couple of things, based on the purpose of the image and its place in the page's HTML.
1) if the image is decorative and contains no informative purpose, your alt attribute should be empty. Not missing, but
alt=""
A missing alt makes the image get flagged by screen readers and creates an accessibility obstacle. An empty alt is recognized by screen readers and the image is ignored.2) If the image is next to text that effectively describes what's going on in the image, say a descriptive paragraph or a caption, then you can get by with an empty alt attribute. Duplicate text is also a negative accessibility factor. It's like repeating what you've said. It's like repeating what you said. ( imagine that 50 times on a web page and you get a taste of what people who have to use screen readers go through every day )
The title attribute ( not the tags, the attribute ) of an image is, the last time I checked, is not relied upon for accessibility. If you're looking for a place to inject more text, that would be preferable than using the alt as a mere placeholder for repetitive text. I don't know the pluses or minuses of using the title attribute in this way, though.
The SEO angle for these attributes in image tags should be a backseat to the accessibility side, but by no means should be it be ignored. It's important.
July 31, 2014 at 7:33 am in reply to: Eliminate render-blocking JavaScript and CSS in above-the-fold content #116431ramseypMemberHi there,
Looking at the URLs of the javascript & css, the bulk of that is coming from various plugins installed and activated on the site. Deactivate all the plugins, then check the pagespeed report again and see what the number looks like. It should be dramatically lower. jQuery is one of the first javascripts loading. That's because it'a a requirement for a great number of scripts out there and it has to load first or they break. I wouldn't worry about that one if it's loading from inside wp-includes.
The problem of plugins littering javascripts and css all over the place isn't new but it is a hassle. Ultimately you may need to look for some alternatives to the plugins that are better written. If you have to have the plugin, unless it has a way for you to have it load its scripts & styles in the footer, you're kind of stuck.
As for the minification issues in W3TC, I've encountered those, too and don't have an answer on that point, unfortunately.
ramseypMemberHi Hansel,
You want to rework your filter function a bit. You need to return
$title
, and the conditionals need to be moved inside the function, around what is to be changed when those conditionals are met. I used a different method of stripping the last word & it works well. I don't know if usingsubstr
withstrrpos
way is faster than usingpreg_replace
, but that would be an option, too, I think.function child_remove_stupidword_from_titles( $title ) { if ( is_home() || is_category() ) { $title = substr($title, 0, strrpos($title, " ")); } return $title; } add_filter( 'genesis_post_title_text', 'child_remove_stupidword_from_titles' );
ramseypMemberThom,
You will need to add the new style declarations to your style.css. Add this to style.css & see if it works:
.breadcrumb a, .streamline-pro-blue .breadcrumb a { color: #c6b88b; }
That will make any links in your breadcrumbs the c6b88b color. If you want the :hover state of the links to be that color, too, you'll need to change the above to:
.breadcrumb a, .streamline-pro-blue .breadcrumb a, .breadcrumb a:hover, .breadcrumb a:focus, .streamline-pro-blue .breadcrumb a:hover, .streamline-pro-blue .breadcrumb a:focus { color: #c6b88b; }
Hope it helps.
February 7, 2014 at 10:59 am in reply to: Responsive Design – How to center a div on small resolutions #89146ramseypMemberIt sounds like your CSS isn't specific enough, if the .alignright rules are still in effect. Can you change up the selectors so the specificity increases?
ramseypMemberThe hook that touches the title text is
genesis_post_title_text
, notgenesis_post_title_output
. Try running add_filter on that & see if it works.
ramseypMemberHi Tim,
In this theme, the nav menu is in the header-right widget area. That width needs to be reduced. Something like this might work:
.site-header .widget-area { float: right; text-align: right; width: 730px; }
Adjust the width as needed & you should be good.
Cheers!
Pat
ramseypMemberHi there,
It looks like you have varying heights in the post's images. As such, it's preventing a clean grid from forming. Try setting a min-height on the post. Something like this in your style sheet:
.home .entry, .home .page .post.entry { float: left; margin-bottom: 32px; margin-bottom: 2rem; padding: 0 16px 16px 16px; padding: 0 1rem 1rem 1rem; width: 28%; min-height: 310px; }
Cheers!
Pat
ramseypMemberThere's a sticky post at the top of this forum on this: http://www.studiopress.community/topic/font-sizing-bug-in-chrome/
Might try the workarounds mentioned there till Chrome's able to fix the issue.
ramseypMemberIs your code in your functions.php?
Add an echo statement so you see if any output is making it to the genesis_header action:
add_action( 'genesis_header', 'custom_slider' ); function custom_slider () { echo '<h1>foo</h1>'; if ( is_home() && function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '29' ); }
If you see "Foo" in the header space, the function is hooking into the action correctly. Are you on your site's homepage ( or blog page, if you have a static page set as the homepage )? Is the slider plugin loaded & working?
Cheers!
Pat
ramseypMemberIs it possible the Genesis Featured Widget Amplified would help? http://wordpress.org/plugins/genesis-featured-widget-amplified/
Rather than separate widgets for Posts & Pages, you use one widget, pick the post type you want, then go from there with the rest of the widget options.
If it's that Pages don't support the_excerpt() by default, you can add support for them in your functions.php:
add_action('init', 'my_custom_init'); function my_custom_init() { add_post_type_support( 'page', 'excerpt' ); }
reference link: http://codex.wordpress.org/Function_Reference/add_post_type_support
ramseypMemberI think this, added to your functions.php file should work:
add_action ( 'genesis_before_content','my_tag_title' ); function my_tag_title() { if ( is_tag() ) { $term = get_tag(get_query_var('post_tag'),false); $name = $term->name; echo '<h1 class="entry-title">'. $name .'</h1>'; } }
ramseypMemberHi Gordon,
Checking to see if you still need help with this. Are you wanting to align the titles to the right of the featured images? If so, the best solution involved rewriting your child theme a bit so archives.php displays post content differently. If you're not comfortable editing PHP, you would want to contact a developer who might be able to assist.
Cheers!
Pat
ramseypMemberHi there,
I think you have a plugin loading those fields. I'm looking at a stock WordPress 3.7, with Genesis and a child theme loaded. No Facebook or Twitter fields exist there.
Pat
ramseypMemberHi there,
If you mean your header-right widget area, and having it load first instead of your title area, there are two ways to do it. Both involved code, one more CSS, the other uses PHP.
1) unhook "genesis_do_header" and replace it in your theme's functions.php file with your own. If you look in your Genesis theme folder, under "lib/structure/", you'll see the header.php file. Lines 834 to 879 are what you want to replace in your theme's functions.php file, along with the right "remove_action()" and "add_action()" hooks.
2) use some CSS to absolutely position the widget-area at the top of the browser window and to add enough a margin to push down the rest of the header.
Depending on where you are with your coding skills, you might find one preferable over the other. My preference is the first one, that way I'm not having to write up a bunch of wacky CSS.
Cheers!
Pat
November 17, 2013 at 1:55 pm in reply to: i want to custome post archive in page archive template #73733ramseypMemberSurprisingly, custom post types are not yet a part of wp_get_archives(). There is a filter you can edit in your functions.php that will work around this, though:
http://wpsnipp.com/index.php/functions-php/adding-custom-post-types-to-wp_get_archives/
Cheers!
Pat
ramseypMemberHi there,
You would have to rewrite the widget as a new plugin or as part of your theme in order to make it use excerpts for Pages.
Pat
ramseypMemberHi there,
This will require some editing of your theme's functions.php file. If that's beyond you, you might want to seek out a developer who can assist you with it.
Open functions.php. At the bottom of the file, if you see this:
?>
Make sure you paste the code for this before that.
Bill Erickson has some code that will display a menu's description field: http://www.billerickson.net/code/add-description-to-menu/
Put that in your theme's functions.php file and the menu will show descriptions. If you don't see a description field in your menus, when you're on the Menus page ( under Appearance ), open the small "Screen Options" tab at the top of the screen. Make sure "Descriptions" is checked and you'll now see a description for each menu item.
Cheers!
Pat
-
AuthorPosts