Forum Replies Created
-
AuthorPosts
-
PeterMember
I'm just guessing here Robin, but have you tried splitting the two query changes like this;
add_action( 'pre_get_posts','child_change_home_query' ); function child_change_home_query( $query ) { if ( $query->is_main_query() AND $query->is_home() ) { $query->set( 'posts_per_page', '6' ); $query->set( 'offset', '5' ); } }
Forum did something weird with the ampersands so I used "AND" instead..
PeterMemberYou could use something like this to limit the number of categories displayed;
add_filter( 'get_the_categories', 'limit_get_the_categories' ); function limit_get_the_categories( $cats ) { return array_slice( $cats, 0, 3 ); }
PeterMemberHi there.
Try adding this to your style.css file;
.home-middle{ border:1px solid #eee; border-width:0 1px; } .footer-widgets-1 { border-right:1px solid #eee; }
PeterMemberWhen you create a rule for something like ".menu-section-head a" it applies to all "a" elements beneath the ".menu-section-head" element.. so what you need to do is add the CSS class to the top level a element and target that specifically.
So your "heading" link might look something like this;
<a class="menu-section-head">Section Heading</a>
and then your CSS would look like this;
a.menu-section-head {color:#000;text-decoration:none;cursor:default;}
PeterMemberYou could add a top margin to the main content area.. try changing the margin of the #content-sidebar-wrap element on line 772 of your style.css file to this;
margin: 20px 0 0;
PeterMemberThere doesn't seem to be a way to make the twitter link open in a new window from within Genesis. The only other way I can think of doing it is with a bit of jQuery.. this page explains how;
http://stackoverflow.com/questions/804256/how-do-i-add-target-blank-to-a-link-within-a-specified-div
February 18, 2013 at 4:21 pm in reply to: Search box and button in primary nav not aligned properly #21112PeterMemberTo get the button to come up beside the text box, you need to make the width of the last menu item wider. If you wanted to make it the same width as the sidebar you could change line 448 of your style.css to this;
.menu li.right { float: right; font-family: 'Oswald',arial,serif; padding: 10px 15px; width: 340px; }
February 18, 2013 at 4:05 pm in reply to: Pinterest Hover Button on Images- Pretty Young Thing theme #21106PeterMemberHi there.
You've probably got this sorted by now, but just in case you haven't, if you go to your Genesis Theme Settings page, down at the bottom you'll see boxes for Header and Footer scripts.. that's where you can add the code.
PeterMemberHi Adrian.
There are a couple of plugins which I think might do what you want;
PeterMemberI think you can just use;
<div class="one-third first">column one..</div> <div class="one-third">column two..</div> <div class="one-third">column three..</div>
PeterMemberHi.
It looks like you've got the #wrap div set to 960px wide in your style.css file. The footer is inside the #wrap div so I think you'll need to take that width setting off to get the footer to go full width. But then you'll also need to add a 960px width to the .wrap elements or everything will go full width..
PeterMemberUsing firebug, if I delete the rule on line 1060 of your style.css which sets the post-image class to 150px width, all the images square up nicely.. is that what you're after?
PeterMemberThere are lots of ways of doing it but this one might work for you. It used the "genesis_after_endwhile" hook to display the latest posts from a specific category after the page content.
Create a new page template in your child theme folder and drop this code into it, replace "Category Name" with the name of your category;
/* Template Name: Category Name */ add_action( 'genesis_after_endwhile', 'display_custom_category' ); function display_custom_category() { $category_id = get_cat_ID( 'Category Name' ); $category_link = get_category_link( $category_id ); $args = array( 'numberposts' => 5, 'category' => $category_id ); $myposts = get_posts( $args ); if ( $myposts ) { ?> <div class="custom-category"> <h4>Regularly updated articles from Category Name</h4> <ul> <?php foreach ( $myposts as $mypost ) { echo '<li><a href="' . get_permalink( $mypost->ID ) . '" title="' . $mypost->post_title . '">' . $mypost->post_title . '</a></li>'; } ?> </ul> <p><a href="<?php echo esc_url( $category_link ); ?>" title="Category Name">Read more articles in Category Name</a></p> </div><!-- /custom-category --> <?php }// end if } genesis();
When you view a page using this page template you should see the normal page content followed by the latest posts from the category you specified in the template followed by a link to the category page.
It's rough and ready and there's no paging or anything but it might be enough to get you going 🙂
More info on the get_posts function at: http://codex.wordpress.org/Function_Reference/get_posts
PeterMemberYou would add that PHP code to your child theme functions.php file, and then put a custom.css file in your child theme folder.
It might be worth you having a read through the tutorials page to get a little more familiar with Genesis child themes.. there's lots of good info in them;
PeterMemberI see what you mean..
I'm finishing for the night now but if you haven't got this sorted by tomorrow I will post up some code for you..
Thanks,
Peter
PeterMemberHi Michael.
On line 244 of your style.css file you have;
.header-full-width #title-area, .header-full-width #title, .header-full-width #title a { width: 960px; }
Change it to;
.header-full-width #title-area, .header-full-width #title, .header-full-width #title a { width:960px;text-align:center; }
And that should sort you out..
PeterMemberHi Mike.
It looks like on line 1060 of your stylesheet you've got the post-image class set to a width of 150px.. is that what's throwing them out maybe?
PeterMemberI'm not sure of there are any "official" tutorials on this but there's one from Brian about creating a page to display a single category.. it's not exactly what I meant but could be a good place to start;
PeterMemberI'd probably create an extra category like "hot tips" and create a custom page for the tips category. Just before the main loop on the tips category page I would add a custom loop for items in the "hot tips" category. You could also modify the main loop not to display items in the hot tips category so you don't get them appearing in both lists.. if that makes sense..
PeterMemberHi Joseph.
If you take a look in the syle.css file, right down at the bottom, you'll see a section called Responsive Design. That's the bit that controls what happens when your site displays on mobile devices ..etc.
You'll see there are subs sections in the Responsive Design section, each with a condition at the start, something like this;
media only screen and (max-width: 767px)
By changing the CSS code within that sub section you can change what displays when a visitor views your site with a browser at that resolution.
Hope that helps!
-
AuthorPosts