Forum Replies Created
-
AuthorPosts
-
SelenaDMember
Christoph, you're a saint. Knowing when things fire is a definite gap in my knowledge. It took me awhile to come back to this, but I am very grateful!
SelenaDMemberThanks Victor, but the ACF portion works just fine. The issue is ONLY with using the add_action as a conditional. It just so happens that I'm using ACF in this particular case.
SelenaDMemberThanks Christoph - but that isn't my issue. That's just my tired brain giving sample code in the forum. 🙁
Here's real code:
function rm_bio_box() { ?> <div class="rm-bio-box"><div class="wrap"> <div class="rm-bio-image"> <?php the_field('bio_image', 'option'); ?> </div> <div class="rm-bio-text-area"> <div class="rm-bio-name"> <?php the_field('bio_name', 'option'); ?> </div> <div class="rm-bio-title"> <?php the_field('bio_title', 'option'); ?> </div> <div class="rm-bio-text"> <?php the_field('bio_text', 'option'); ?> </div> </div> </div></div> <?php } function rm_bio_box_position() { if(is_front_page()) { add_action ('genesis_before_content_sidebar_wrap', 'rm_bio_box', 15); } } add_action('genesis_before_loop', 'rm_bio_box_position');
SelenaDMemberAwesome - thanks!!
SelenaDMemberThanks Tom, that's an interesting thought.
Brad I've created fully custom author boxes before, but I was hoping Genesis might have a hook I hadn't found to allow me to slot that in there without doing that. You offer an awesome service at WPSites though - hopefully someone else searching for this will find it helpful!
SelenaDMemberThe Genesis Sample theme is specifically designed to be a starting point.
SelenaDMemberNot a caching issue. If you use view source or inspect the element you'll see that there's an extra paragraph mark before the image div. It only shows up when there is an image at the top of the post, and occurs on ALL posts with images at the top. This is just an example.
SelenaDMember🙂 Glad you found it!
SelenaDMemberYour a.button styling (line 459) has a float:left and padding: 6px declarations. Remove those and it will fix the button.
SelenaDMemberAlso, you should declare a fallback font so things will degrade gracefully if needed. At least add "serif" or sans-serif" to your declaration like this:
font-family: "Amatic SC", sans-serif;
SelenaDMemberAll of your font-family declarations end with a comma, not a semi-colon. That's causing the font-size declaration to not be recognized. If you correct that it should fix your sizing issue.
SelenaDMemberHi Grant - can you show us the code you are using to add the slider? Did you create a front-page.php file or are you dong it all from functions.php?
SelenaDMemberThank you Brad - that did the trick!
October 29, 2014 at 8:58 am in reply to: Strange Problem – Sidebar Disappears to Bottom of Website #129740SelenaDMemberThe max and min widths are optional, your site-container is going to create a maximum anyway. But they can be handy in cases where you want something smaller than the container. For instance, on a full width layout site I have content set at 800px using a percentage of the site width. However, on smaller screens I want it to fill the space, not start shrinking. So one way to do that is set width at 100% with a max-width of 800px.
It's a way to cut down on the number of media queries you need by making your content more fluid to start with.
SelenaDMemberI used Chrome Inspector - I'm not a huge fan of Firebug. The premise is the same, but I find Inspector easier to find things with.
Also, as you do this more it becomes easier to know what you're looking for! 🙂
October 29, 2014 at 8:05 am in reply to: Strange Problem – Sidebar Disappears to Bottom of Website #129725SelenaDMemberWhen you make your width a hard number like "800px" then it is going to stay that even when the screen get smaller - so then your content starts getting cut off.
Instead do your content and sidebar widths as a percentage, starting at your highest width. Let's say you've set the site container width to be 1200 px, with the content 800px and the sidebar 300px.
Set your content width at 66.666666666% (800/122) and your sidebar at 25% (300/1200). You can then use "max-width" or "min-width" to add upper and low limits. If you need the sidebar to remain a constant you can still use percentage for the content - but at some point they won't both fit anymore.
The theme is responsive - dropping the sidebar below content is what responsive themes do when there's not enough room, and once you edit it you may break some of the responsiveness.
A tool like responsivepx.com can help you find the spot where things are dropping so you can make changes or use media queries to deal with those points.
SelenaDMemberLine 886 .featured-content .entry-title - add "text-align: center;"
Line 891 .featured-content .entry-content - add "text-align: justified;"
If you want to center the "Learn More" also then on line 905 .featured-content .more-link - add "text-align: center;"
I hope that helps!
SelenaDMemberAre you wanting to center the title text and justify the body text? In that case just use text-align: center on the title and text-align: justify on the body text.
If I'm not understanding your question correctly please let me know.
SelenaDMemberI still only get the the picture of author id = 2.
I tried this:
$author_id=the_author_meta('ID'); function default_image_fallback() { if(has_post_thumbnail()) { the_post_thumbnail(); } elseif($author_id = "2") { echo '<img src="' . trailingslashit( get_stylesheet_directory_uri() ) . 'images/jon-thumb.jpg' . '" alt="Jonathan Warner" />'; } elseif($author_id = "3") { echo '<img src="' . trailingslashit( get_stylesheet_directory_uri() ) . 'images/sam-thumb.jpg' . '" alt="Samuel Warner" />'; } else { echo '<img src="' . trailingslashit( get_stylesheet_directory_uri() ) . 'images/default-thumb.jpg' . '" alt="Samuel and Jonathan Warner" />'; } }
I also tried removing the second "elseif" and moving straight to the else statement. That didn't work either - still got the first author's picture each time.
I tried defining the author id differently just in case that was the problem, but it isn't. I've echoed the $author_id to make sure it's pulling the correct id for each author and it is. 🙁
September 6, 2014 at 12:14 pm in reply to: Google's new call tracking and _googWcmGet function #123070SelenaDMemberNo. I know I need a custom function in functions.php. But I still don't know how to write it, or which example to use.
-
AuthorPosts