mdi
Forum Replies Created
-
Forum: Themes and Templates
In reply to: How to style latest post AND recent posts differently?so am i. ;o)
– you want to show 5 posts per page
– you want one class/style for the first (the most recent) post
– you want a different class/style for posts 2-5– AND you want another different class/style for any other/older posts?
if that’s the case, you can simply change:
<?php if (is_paged()) : ?> <?php $postclass = ('other entries'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'first entry' : 'other entries'; ?> <?php endif; ?>
to:
<?php if (is_paged()) : ?> <?php $postclass = ('class 3'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'class 1' : 'class 2'; ?> <?php endif; ?>
in your css-file you need 3 classes. class 1 for the first post, class 2 for posts 2-5, class 3 for the older posts.
Forum: Themes and Templates
In reply to: How to style latest post AND recent posts differently?<?php get_header(); ?> <div id="x"> <?php if (have_posts()) : ?> <!-- you want to show 5 posts per page... --> <?php query_posts("showposts=5"); ?> <?php while (have_posts()) : the_post(); ?> <!-- ...so your blog will have many pages. but only the first post on page 1 should use a different class --> <?php if (is_paged()) : ?> <?php $postclass = ('other entries'); ?> <?php else : ?> <?php $postclass = ($post == $posts[0]) ? 'first entry' : 'other entries'; ?> <?php endif; ?> <!-- let's go --> <div class="<?php echo $postclass; ?>"> <h1><a href="<?php the_permalink() ?>" rel="bookmark" title=""><?php the_title(); ?></a></h1> <?php the_content(''); ?> </div> <?php endwhile; ?> <?php else : ?> <!-- what if there are no posts? --> <?php endif; ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: List of WordPress PHP tags?Forum: Fixing WordPress
In reply to: how do I change the “[…]” after the excerpt?you don’t have to edit any core files, you can instead add arguments to the template tag. for example any text, dots, etc:
<?php the_content('...'); ?>
or any html-code (<p>…</p> doesn’t validate):
<?php the_content('<span class="my-excerpt">read more</span>'); ?>
i don’t like my short answers, but my english isn’t good enough… ??
edit: you have to add the “more-tag” manually in your posts to make this work, because now in your template you don’t use “the_excerpt”.
Forum: Fixing WordPress
In reply to: need PHP help for get_the_category<?php $cat = get_the_category(); $cat = $cat[0]; ?> <a href="<?php echo get_category_link($cat);?>"><?php echo $cat->cat_name; ?></a>
…???…
Forum: Plugins
In reply to: Change number of Recent Posts in sidebarthis thread is about the plugin “sidebar widgets”. if you don’t use this plugin (you don’t need to), you can limit the number of posts with
<?php wp_get_archives('type=postbypost&limit=X'); ?>
in sidebar.php in your template directory, where X is your desired number of posts.
Forum: Fixing WordPress
In reply to: post fully opened when clicked categorya link to your blog would help ??
the template-tag to show the whole post is:
<?php the_content(); ?>
the template-tag to show the excerpt is:
<?php the_excerpt(); ?>
the template-tag to show the title is:
<?php the_title(); ?>
if there’s a file archive.php in your template directory, you’ll find the above title-tag in this file. to show the whole post you have to add the “content-tag” right after the title-tag.
for example:
<div class="bla"> <h1><?php the_title(); ?></h1> <?php the_content(); ?> </div>
if your archive page (the page with posts from only one category, date, etc.) looks the same as your index page, you can copy this from your index.php.
Forum: Installing WordPress
In reply to: Upgrading to 2.3.1the htaccess file (if you have one) is in your blog′s root folder. in CuteFTP you should see it. deleting this file means that you′ll have to check your options for privacy and permalinks …later, if your blog reappears ??
have you tried to delete and re-upload all your files manually (with CuteFTP)? maybe there′s something missing or in the wrong directory. or maybe you forgot to run https://www.motorparasi.com/wp-admin/upgrade.php once after uploading your files?
before you touch your database to find out what happened to your blog, please make a backup ??
Forum: Themes and Templates
In reply to: need help in css hack for imageyou’re absolutely right, moshu. resize and then upload is the best solution.
Forum: Themes and Templates
In reply to: need help in css hack for imagedon’t know if it works with “1oo%”, but you can define a maximum width/height in pixel. internet explorer doesn’t understand “max-width”. you have to tell him something like that:
p img {
width: expression(this.width > 450 ? 450: true);
max-width:450px;
}Forum: Fixing WordPress
In reply to: Change “about” text in recently installed themethe about-box of your theme’s sidebar seems to be “hardcoded”, so you have to edit heading, text and link in “sidebar.php” (located in your theme folder).
–
<h2>About</h2>
(the heading of the about-box)
–<p> ... <br>
(the text)
–<a href=" ... /?page_id=2"><strong>more about »</strong></a>
(the “more about” link)“more about” links to page_id=2 (your present about page). so the whole box doesn’t make any sense to me… maybe you can use this box as an “about-teaser” or “about-excerpt” =) … or delete the link and use the box as your about-page … or delete the whole box from sidebar.php.
Forum: Installing WordPress
In reply to: What version should I upgrade to?Forum: Fixing WordPress
In reply to: Solution for 2.3 database errors / wp_post2cat does not existmaybe it’s because you »upgraded so many times« and because you’re such a pro, that you don’t read instructions… maybe it’s because you found WordPress somewhere else…
We’ve got information on installation and upgrading if you need it.
Step 0: Before You Get Started
* Just in case something goes wrong, it never hurts to have a backup. We have extensive instructions to help you out.
what else do you need?
Forum: Plugins
In reply to: CQS not supported for WP 2.3maybe a solution… tested it on my testblog, and I think it works ;o)
in custom-query-string.php (line 252) change:
… SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = …
to:
… SELECT term_ID FROM $wpdb->terms WHERE slug = …
Forum: Your WordPress
In reply to: Is this too light?The only thing I don’t like is that it’s not completely done ;o) Cause for me there’s nothing too light, too little contrast, too little fonts, too little style, too little… For me it’s completely done.
The concept was that the design would be so subtle as to force the content to stand on its own…
Form follows function.