Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter dl33

    (@dl33)

    Thanks a lot… This saves me multiple loops and else statements. In the end I actually used this though:
    <?php if ( (is_home() && !in_category('6')) || !is_home() ) { ?>
    It works perfect…(although the brackets are making me dizy as well;-)

    Thread Starter dl33

    (@dl33)

    Sweet… Thanks… (It works)

    Thread Starter dl33

    (@dl33)

    Yup, I thought about that, but if the page is not home, then the loop will not be gone through. Yet I also want the loop to show if the page is not home. The loop should only be wrapped in the !in_category(‘6’) conditional if I am on the home page, otherwise not. With the above solution the loop wouldn’t display it at all on those other pages.
    dl33

    ok, sorry, in that case I didn’t get the question…

    Thread Starter dl33

    (@dl33)

    I now have this code:

    <?php get_header(); ?>
    <?php $i = 1; ?>
    <div class="firstpost"><!--First Post-->
    <?php rewind_posts(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if ( $i == 1 ) { ?>
    The first post
    <?php }?>
    <?php $i=$i+1; ?>
    <?php endwhile; ?>
    <?php else : ?>

    <?php _e('Sorry, no posts matched your criteria.'); ?>

    <?php endif; ?>
    </div>

    <div class="primary"><!--Other Posts-->
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if ( $i > 1 ) { ?>
    All the other stuff
    <?php } ?><!-- End if i>1-->
    <?php $i=$i+1; ?>
    <?php endwhile; ?>
    <?php else : ?>

    <?php _e('Sorry, no posts matched your criteria.'); ?>

    <?php endif; ?>
    </div>

    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    However, the first post appears twice. What am I doing wrong?

    Have a look at http://automattic.com/code/widgets/
    I use it to specify the sidebar options that stay the same for all sites of my blog. After the dynamic sidebar, I just put my own code (for example related posts), which only appears depending on the kind of page that you are on.
    Have a look if it works for you…

    Thread Starter dl33

    (@dl33)

    (Just replying to get this post back to the top) Can anyone have a loo at the post before this… I tried quite a few things, but that only messes up everything: (Nothing will show anymore…)
    Thanks,
    dl33

    Thread Starter dl33

    (@dl33)

    Sweet, this works….
    I am assuming that I keep all the other code the same (in index.php and in the sidebar.php)? The link that I posted before also told me to insert other code… That stays the way it is, right? Or does it not have any function anymore?

    Oh, and one more question:
    Since I inserted the code (look in the link) into my loop, it will not display the content of the aside in my main content anymore. (Which is good.) However, I do want it to show if I am on a single page: I have this code in my loop now:

    <?php rewind_posts(); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php if ( !(in_category(‘6’)) ) { ?>
    THE LOOP
    <?php } ?>
    <?php endwhile; else: ?>
    <?php _e(‘Sorry, no posts matched your criteria.’); ?>
    <?php endif; ?>

    How do I have to change the line <?php if ( !(in_category(‘6’)) ) { ?> so that the loop is not executed for all asides, except when the page is a single page? (Sorry, wordpress newbie)
    Thanks a looot already, dl33

    Thread Starter dl33

    (@dl33)

    “I put my asides in the sidebar.”
    I used the way described in http://codex.wordpress.org/Adding_Asides#Displaying_Asides_on_the_Sidebar
    Should I use another more convienient way?
    I want all asides (the most recent ones) to show on the sidebar, no matter what page you are on. (All pages that load sidebar.php should show the asides.)
    dl33

    dl33

    (@dl33)

    HI mdp1,
    did you find out how to do this yet…? I am looking for the same answer!
    Thanks, dl33

    Thread Starter dl33

    (@dl33)

    Another Question: How would I indent the top menu text from the right and center it vertically? I tried padding, but that also shifts the backgrund image, which I do not want…

    Hi,

    although this might not really help you, it might help others to help you. (Especially since English is more common language than Italian. — at least in forums;-)
    This is the error message that Safari displays:
    Safari can’t open the page “feed://www.davidemuci.it/blog/feed�. The error was: “unknown error� (NSURLErrorDomain:-1
    Have you tried changing the formatting of the feed?
    A working feed reads like this at the top:
    <!doctype HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
    <html>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=”UTF-8″ />

    etc..

    I am not sure this is of help, I hope it though;-),dl33

    Thread Starter dl33

    (@dl33)

    Ok, sure, lets post ’em here. (sorry about that)
    Some of the problems that I have are:
    – There is a big space after the first post. (css related? why?)
    – The menu doesn’t float to the the very top.
    – The footer does not want to stretch 100% of the width of the window.

    Also I would really like to have some feedback on what I did up to now. (but remember its a betagious beta. (not anywhere near beeing finished) Feedback would really help me to make it better.
    Thanks a loot already, dl33

Viewing 14 replies - 1 through 14 (of 14 total)