Forum Replies Created

Viewing 15 replies - 136 through 150 (of 153 total)
  • I’m not exactly sure you you mean… there are 2 links per title, one to the category and one to the post. You want to change just the color of the category-links? In that case, modify the div as described before, and put this into your css:

    .title { font-size: 26px; } // you seem to have altered that from 30px to 26px?
    .title em a { color: #xxxxxx; }
    .title em a:hover { color: #yyyyyy; }

    Hope I could help…

    I’m pretty sure, it’s your headlines in the divs alignleft/alignright. They are “styled” with float:left and float:right, but you don’t really want them to float.

    However, I’m not sure how to work around that with a simple explanation ;)… try to replace these two floats with the following…

    Replace float:left in div.leftalign with…

    display: inline;
    text-align: left;

    …and float:right in div.rightalign with:

    display: inline;
    text-align: right;

    Maybe that’s enough to fix it.

    Suggestions:

    1) If I were you, I’d put the “categories” menu to the top of your left sidebar, not to the bottom. The newsletter-signup should be somewhere below the recent posts, because it’s just not that interesting (no offence ;)).

    2) Viewing an archive (months or categories), you can see, that there is very little space between the post-meta (date) and the content. There should be at least 5px margin.

    3) If you hover something in the top menu, there is a 1px-whitespace between the menu-button and the line below (maybe due to a padding?). It would be nicer to have the blue boxes adjacent to the line.

    But these are just minor issues, you did a nice job overall :).

    Forum: Fixing WordPress
    In reply to: Recent Posts Code

    First of all… the line "<?php $wp_query = $myquery; ?>" needs to be BELOW the endwhile. Otherwise you get a real mess.

    And second… of course it doesn’t show anything, because there is nothing inside your loop. You need to put template tags inside it like the_title() and the_content().

    I’ll give you an example of a very simple loop:

    <?php while (have_posts()) : the_post(); // watch the semicolon at the end of the line, I forgot that before! ?>
    <h2><?php the_title() ?></h2>
    by <?php the_author() ?> · <?php the_time('F js, Y') ?>
    <?php endwhile; ?>

    I hope, it got it all right and could help (I’m pretty new to wordpress, too)… and maybe this gives you a better understanding of The Loop itself.

    Forum: Fixing WordPress
    In reply to: Recent Posts Code

    You might be interested in this.

    You should modify that code with "<?php $myquery = $wp_query; ?>" before the query_posts and "<?php $wp_query = $myquery; ?>” after the end of the loop to preserve the original query.

    Two possibilities come to mind…

    1) If you don’t have a home.php in your theme, create one and put your error message into it. If home.php exists, it will automatically be your front page. However, if someone follows a direct link to an archive oder a post (or types in such a link as URL), your site will still be visible as it is now.

    2) The next best thing would be to rename your index.php to i.e. myindex.php, create a new index.php, and then again put your error message into it.

    If you have a home.php, you might consider replacing it as (2) describes for the index, and (for additional “safety”) do the same with index itself.

    By the time you want to revive your blog, you just (1) delete the home.php or (2) replace index.php with myindex.php

    1) Look for the following part of code:
    <div style="font-size:30px;">
    2) Replace it with:
    <div class="title">
    3) Add the following lines to your style.css:

    .title a { font-size: 30px; color: #xxxxxx; }
    .title a:hover { color: #yyyyyy; }

    #xxxxxx and #yyyyyy have to be the colors you desire (like #ff0000 for red).

    4) Be happy! ??

    If you had checked out the plugin I suggested, you wouldn’t ask. ??

    Why do it the difficult way accessing the DB directly? One can do it with a query and a small loop:

    <?php // query posts for the desired categories (10,11,12) and display the 10 recent ones
    query_posts('cat=10,11,12&showposts=10');
    while (have_posts()) : the_post() ?>
    // loop content
    <?php endwhile; ?>

    Since you don’t need the original query for any other content of your static front page, you don’t even need to bother to save and restore it using an “auxiliary” variable.

    I don’t know a way to change that, but why would you want to?

    If you don’t like the margins of the p-tag, feel free to change them. Let’s say, your posts are being displayed within in <div class="post"><p>*post-content*</p></div>… in that case you could add something like .post > p { margin: 0; } to your css-file.

    You could work with excerpts. There is an excerpt plugin (the_excerpt Reloaded), which allows for some customising like length of the excerpts.

    Then you’d have to put something like this into your index:
    if (is_category()) { the_excerpt_reloaded(options); } else { the_content(); }

    edit: too slow ;)… but the plugin might still be worth a look! Oh yes, and I presumed, your category archives would be displayed by your index.php

    You cannot edit widgets, that’s the general idea. If you want to create something specific, do it with a text widget. If you need php code to be executed, try the Samsarin PHP Widget plugin.

    The entries in “Palace Grounds” are not displayed as a list, so the ‘#menu ul ul (li) (a)’ won’t apply to them. Just add a <ul> in the beginning and </ul> in the end of your text widget and enclose every "<img ... /><a></a>" in <li> ... </li> tags, that should do the trick.

    If there’s still someone interested in a way, I needed something similar and came up with a little “hack” abusing query_posts()…

    <?php $myquery = $wp_query;
    query_posts('cat=a&showposts=999');
    $numberofposts_a = $wp_query->post_count;
    // [...]
    query_posts('cat=b&showposts=999');
    $numberofposts_b = $wp_query->post_count;
    // [...] as often as you like for each category a, b, c, d, etc.
    $wp_query = $myquery; ?>

    This way, the plain number of posts is being assigned to the ‘$numberofposts-x’ variables. Of course, you have to set the query variable ‘showposts’ in your query to a higher value than the number of existing posts in each category.

    You will have to adjust the padding-values for “#right_container h2” and “#right_container ul li a” to your needs. It’s rather difficult to give recommendations, because I don’t know where exactly you want certain spaces, but it might be a good idea to experiment with the paddings of “#right_container ul” and “#right_container ul li” as well.

    Just backup your style.css and then feel free to mess around! ??

    As for your first menu items being aligned to the left… I don’t know what you mean. Maybe that’s something you could fix with padding-left-values?

Viewing 15 replies - 136 through 150 (of 153 total)