RGlover
Forum Replies Created
-
Forum: Themes and Templates
In reply to: How to get recent posts on home page?The line we will concern ourselves with is in the <div class=”hpbottom”> section. The line in question presently reads thus:
<?php $recent = new WP_Query("cat=1&showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
You’ll want to change it to be:
<?php $recent = new WP_Query("showposts=3"); while($recent->have_posts()) : $recent->the_post();?>
Basically, you’re removing the option that tells it which category to take from (that way it will draw from all categories). You can also edit the number after showposts= to alter the number of posts you wish to appear in that section.
Forum: Themes and Templates
In reply to: Layers positions change when screen resolution is differentFor starters, your HTML doesn’t validate.
https://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.justkeira.fan-sites.org%2F
That’s bound to cause a few critical issues.
I think that’s probably responsible for the majority of your problems, in fact. You’ve got a whole bunch of extra divs you don’t use, plus you’ve got the presentation information wrapped up tightly with the markup, making it hard to determine where exactly the problem lies.
I think you might have some luck if you included the content area and sidebar area inside the main container div. That might help you constrain things a bit.
But I’d start by fixing those validation errors and separating my style out into separate CSS files, rather than using it inline with the markup.
Forum: Themes and Templates
In reply to: How to get recent posts on home page?You need to edit the query for the $recent query object. I’m not sure where that’s being set up (it isn’t in the code snippet you posted) so I’m not quite sure to tell you how to change it.
But the code you’re looking for should look like this:
$recent = new WP_Query(‘*some query data*’);
For more information on how to get the info you want see: https://codex.www.ads-software.com/Function_Reference/WP_Query
Forum: Themes and Templates
In reply to: Cant summarize articles on home pageUse the <!–more–> tag in the post to indicate where you want the content to be truncated.
Conversely, you could also alter the index.php file to use the_excerpt() or the_content_rss() instead of the_content().
Check the codex reference for those functions to see specific examples.
Forum: Themes and Templates
In reply to: My Text Formatting is not right.Your body style has the color set to #757575 – a medium grey color. That’s the overriding style.
Where is it you’re changing the color of the text?
Forum: Themes and Templates
In reply to: Category Links Not Working ProperlyCheck your permalink settings. It should look something like this: /%category%/%postname%
Make sure you’ve got that leading /.
Forum: Themes and Templates
In reply to: New portfolio themeI like the idea. As a designer I’d like to see a little stronger grid, particularly down toward the bottom (space the blog posts/widgets out a little bit so that the edges line up with the header bar, and eliminate the margin around the statement paragraph so that it lines up with the rest of the elements). I’d also like to see a little more whitespace in general in the text to improve readability. Increase the line-height a little bit, for example.
I definitely dig the slider. That’ll be pretty sweet.
Forum: Themes and Templates
In reply to: Navigation Menue ErrorHaving limited information on what’s going on here, I’m going take an educated guess:
I’ll bet that menu.js traverses the document, and creates a list of elements for manipulation, storing them in an object called list. Then, to work on the specific element, it pulls the first child of the list into a variable called node, and then manipulates node.
For whatever reason the list object isn’t being populated properly.
What have you changed recently between the time when it was working and the time when it stopped? Have you altered the template code? Perhaps you’ve removed a class that the js menu plugin needed to find the appropriate elements in the DOM to pull into the list?
I’m just guessing here, as there’s not a whole lot of information to go on. But traipsing through the javascript and trying to determine why you wind up with an empty list is the next logical step, I think.
Forum: Themes and Templates
In reply to: How to create a WP LayoutIt’s absolutely possible. And a lovely design, by the way. I like it very much.
Another excellent resource for going from design to final theme would be the ThemeForest Blog’s WordPress for Designers series. It’s very well done. Tuts+ also has some excellent tutorials on wordpress theme development.
Good luck.
Forum: Themes and Templates
In reply to: CSS Help – Customizing <?php comment_text() ?>I would add the following style to your CSS:
ol.commentlist li p { padding-top: 3px; }
I arbitrarily picked 3px. Adjust that up or down as you see fit. Right now all of your paragraphs, by default, get 15px of top padding. This rule just specifically targets the paragraph tags in your comments section and re-adjusts that value.
Brittany,
The greatest thing about WordPress is the fact that you can pretty much do anything you want with the look and feel if you’re willing to put in the effort to do it. If you had a look that you were happy with, you can likely replicate that look by customizing an already made theme, or building a theme of your own from scratch.
When I want to customize a theme, I usually start with a totally blank canvas theme (like Starkers by Elliott Jay Stocks ). That gives me maximum control over what I want to put on the page.
Of course, I’m good with HTML/CSS/PHP. If you’re not, you may want to follow along with a tutorial on how to customize a wordpress theme. There’s a great one that can be found at the ThemeForest Blog called WordPress for Designers. Tuts+ also has some nice WordPress theme development tutorials that take you from looking at a layered photoshop file, all the way through a live theme.
If you don’t want to go through all of that, you can also just edit a standard theme to your liking. That is best done by replacing the requisite images, and altering the theme’s stylesheets to suit your needs.
Regardless of how you go about it, you should be able to use your headers, banners, backgrounds, and whatever else you need/want.
Forum: Themes and Templates
In reply to: Sub-menu based on categories pleaseYou’ll probably want to do something like this:
<ul> <?php wp_list_categories('show_count=0&title_li=&depth=1'); ?> </ul> <?php //above here is fine ?> <div id="subnav"> <ul> <?php global $post; $this_categ=0; foreach((get_the_category($post->ID)) as $category) { $this_categ=$category->cat_ID; } if($this_categ){ $output = wp_list_categories ('echo=0&child_of=' . $this_categ. '&title_li='); } echo $output; ?> </ul>
That’s untested, but passing the post ID as a parameter allows get_the_category() to work outside the post.
Forum: Themes and Templates
In reply to: How to get a specific post design for only one categoryAnother way I suppose you could do the job would be to use the in_category() method to test whether or not the_post() was in the category you want styled differently, and then output different HTML if that is the case, but it would seem a little excessive to do things that way, particularly as post_class() is already there, and targeting specific CSS styles seems like the faster and more effective option in the long run.
Forum: Themes and Templates
In reply to: How to get a specific post design for only one categoryIf you’re using WP 2.7+ with a 2.7+ compatible theme, each post should be getting a class that includes the category into which it is placed. (e.g. category-uncategorized, category-pictures, category-tutorials, etc.) You can check to see if that is indeed the case by examining your index.php file and looking for <?php post_class(); ?> in the element in which the post is contained (typically a <div> element).
If those things are true, and you’re getting a category-x class for each of your posts, it should be a simple matter of adding the relevant CSS Styles to your stylesheet.
Hope that helps.
Forum: Themes and Templates
In reply to: Multiple loops using WP_Query()AH HA! Sorting through the WP_Query class turns up that they’ve changed the variable name I was looking for from post_name to pagename. Changing that now returns the appropriate data in the loops.
Hopefully that helps someone else.