Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • 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.

    <?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(); ?>

    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”.

    <?php
    $cat = get_the_category(); $cat = $cat[0];
    ?>
    <a href="<?php echo get_category_link($cat);?>"><?php echo $cat->cat_name; ?></a>

    …???…

    this 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.

    a 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.

    the 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 ??

    you’re absolutely right, moshu. resize and then upload is the best solution.

    don’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;
    }

    the 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.

    straight to 2.3

    with every update you have to overwrite all the files on your server. so there′s no need to update “step by step” ??

    – backup your existing blog (files and database)
    – deactivate all your plugins
    – read this and this
    – upgrade your blog
    – search for updated plugins and themes =)

    @demodulated

    maybe 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?

    maybe 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.

Viewing 15 replies - 1 through 15 (of 16 total)