ivovic
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Displaying Latest Posts From Just One Categoryfree your mind, and consider actually trying what you’re given before dismissing it.
If you don’t like the look of that, try this… but either will work.
http://codex.wordpress.org/Template_Tags/get_postsForum: Themes and Templates
In reply to: How can I enlarge the line distance?Please have the courtesy to warn people when linking to sites that are not safe to browse at work. A simple “NSFW” is fine.
It also helps me to quickly find sites I want to visit π
if you want more white-space between your lines, look for “line-height” in your css file. if it’s not there, consider adding:
line-height: 1.5em;
to the definition for your ‘p’ tag. adjust numbers as required.
Forum: Fixing WordPress
In reply to: please help with get_posts()OK… since there seems to be no wordpress function which will do exactly what you want, you have 2 choices.
1) write your own SQL query, which is effective, but not very future-resistant. It would be best to use wordpress functions.
2) use wordpress functions but cheat a little. It’s not going to win you any programming awards, but it’ll work.
consider pulling more results than you need, but only outputting the first 5. This should compensate for any posts in the category you wish to exclude.
lets try this:
<?php $count = 1; $postslist = get_posts('post_type&numberposts=10&offset=2'); foreach ($postslist as $post) : setup_postdata($post); if (!in_category('3') && $count < 6) : ?> <div id="post-<?php echo $count++; ?>" class="posti"> <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php the_content_limit(150,'VeΔ →'); ?> </div> <?php endif; endforeach; ?>puno sreΔe.
Forum: Fixing WordPress
In reply to: Adding another blog…you could even use the same database if you wanted.
just use the same settings you have in your current wp-config.php, in your NEW wp-config.php, with one notable exception.
Make sure you change the table prefix for your second blog, otherwise you’ll have two of the same blog π
Forum: Fixing WordPress
In reply to: Next and pevious articlestry this:
<div class="tsnavigation"> <?php $previousPost = get_previous_post(); $nextPost = get_next_post(); if (!is_null($previousPost)) echo '<div class="alignleft">'.previous_post_link('%link').'</div>'; if (!is_null($nextPost)) echo '<div class="alignright">'.next_post_link('%link').'</div>'; ?> </div>Forum: Fixing WordPress
In reply to: How do you create a group blog that multiple users can post to?if you want people to make new posts and literally NOTHING else… then consider the TDO Mini Forms plugin, which lets you provide a posting page on your front-end for users.
They can create posts which you can (optionally) approve prior to them being displayed.
Forum: Fixing WordPress
In reply to: please help with get_posts()well, I don’t understand how your pages are supposed to work in the chronology.
do you create new pages all the time? if so, why the hell would you do that when you can just post into a new category?
pages and posts are almost identical, until that ‘almost’ part comes to bite you in the ass at display time.
Forum: Everything else WordPress
In reply to: Advertising for beginnersPlease, I mean this in the nicest possible way…
Please consider blogging for more than 5 minutes before adding advertising to your site. Any ads on your pages will require a reasonable amount of content in order to pull effective ads onto your pages anyway.
these things should become clear very quickly when you start filling your blog with content.
Forum: Fixing WordPress
In reply to: Generate category-specific rss in Archive template?your link is malformed… click on it with anything, and you’ll see brackets jammed in the url.
fix the link.
Forum: Fixing WordPress
In reply to: please help with get_posts()Ahh no you’re not *I’m* wrong. Sorry.
use query_posts() to create a custom loop instead http://codex.wordpress.org/Template_Tags/query_posts
this one *does* allow you to exclude categories.
Forum: Fixing WordPress
In reply to: please help with get_posts()if you had looked up the get_posts reference information in the codex, you would have found the ‘exclude’ parameter.
http://codex.wordpress.org/Template_Tags/get_posts
enjoy π
Forum: Fixing WordPress
In reply to: [Plugin: Ajax Comments-Reply] Incorrect codetry the honking big code button. (use the edit link to change your post, don’t just leave that shit there)
Forum: Fixing WordPress
In reply to: Screwed myselfstart on line 57 of wp-config.php
remove any white space.
(simulpost™)
Forum: Themes and Templates
In reply to: Extra characters in the wp_list_pagesheh, no worries, really should have started there… except that you’ll have to change your CSS if you switch to wp_list_bookmarks, or categories for your menu, at any point.
Forum: Themes and Templates
In reply to: Extra characters in the wp_list_pagesscrew it… I looked up the default classes for the wp_list_pages function… it’s actually better if you use them anyway.
#menu ul li { list-style-type: none; display: inline; padding: 0 8px 0 8px; } #menu .page_item { border-left: 1px solid #cccccc; }you don’t need .menuhome at all, and don’t try to put page_item in your template, the list pages function does that already.