Forum Replies Created

Viewing 15 replies - 1 through 15 (of 43 total)
  • Thread Starter zoblue

    (@zoblue)

    @sterndata thank you so much! I followed the instructions to repair the tables and it returned no further errors. The tables all say repair status OK except for two “wfls_2fa_secrets” and “wfls_settings” which look like those don’t support the repairing function. I will mark this as closed. Thanks again!

    I also had this problem! Seems like there isn’t a solution, I had to remove the code from the widget and place it back on the actual page. Bummer!

    Thread Starter zoblue

    (@zoblue)

    Great idea, but the client didn’t have the budget. Maybe I’ll build one for myself for future use.

    I did find the Ad Rotator plugin and that helped make things a lot easier for the client:
    http://kpumuk.info/projects/wordpress-plugins/ad-rotator/

    Thread Starter zoblue

    (@zoblue)

    So, maybe this isn’t possible? Just wonderin’ 🙂

    Thread Starter zoblue

    (@zoblue)

    I’ve updated the code a bit, the only change was in the second line. I used ‘category_name’ instead of ‘cat’ and moved the end of the link tag up a few lines…

    <?php query_posts('category_name=In the magazine&showposts=1'); ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div id="post-<?php the_ID(); ?>">
        <a href="<?php the_permalink() ?>" rel="bookmark">
        <?php // check for thumbnail
        $thumb = get_post_meta($post->ID, 'thumbnail', $single = true);
        // check for thumbnail class
        $thumb_class = get_post_meta($post->ID, 'thumbnail_class', $single = true); ?>
        <?php // if there's a thumbnail
        if($thumb !== '') { ?>
        <img src="<?php echo $thumb; ?>" class="<?php if($thumb_class !== '') { echo $thumb_class; } else { echo "left"; } ?>" alt="<?php echo the_title(); ?>" title="<?php echo the_title(); ?>" />
        <small>in current issue</small></a>
    	<?php } // end if statement
        // if there's not a thumbnail
        else { echo ''; } ?>
        <?php endwhile; else: ?>
        <?php endif; ?>

    @johnnywhee, I hope this helps:
    Copy/pasta the above code into your sidebar and customize the first line of code where it says:
    category_name=your super special category

    and spaces are ok too. Then when you write your post, customize the following three items for the it.

    1. Category: your super special category
      and it must match what’s in the php code!
    2. Add two key/value combos:
    1. Key: thumbnail
      Value: http://url/to/thumbnail
    2. Key: thumbnail_class
      Value: css_class
      The css_class can be whatever you want and it allows you to style the image

    I hope that helps!

    Thread Starter zoblue

    (@zoblue)

    Success! Not exactly on the ball but dang close enough. It doesn’t look like there’s a way to add a category to a Page and then run a query_pages.

    After following your instructions and adding the necessary custom fields, the coded ends up looking like this:

    <div id="current_issue">
        <?php query_posts('cat=Feature&showposts=1'); ?>
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div id="post-<?php the_ID(); ?>">
        <a href="<?php the_permalink() ?>" rel="bookmark">
        <?php // check for thumbnail
        $thumb = get_post_meta($post->ID, 'thumbnail', $single = true);
        // check for thumbnail class
        $thumb_class = get_post_meta($post->ID, 'thumbnail_class', $single = true); ?>
        <?php // if there's a thumbnail
        if($thumb !== '') { ?>
        <img src="<?php echo $thumb; ?>" class="<?php if($thumb_class !== '') { echo $thumb_class; } else { echo "left"; } ?>" alt="<?php echo the_title(); ?>" title="<?php echo the_title(); ?>" /><?php } // end if statement
        // if there's not a thumbnail
        else { echo ''; } ?>
        <br />
        <small>in current issue</small></a>
        <?php endwhile; else: ?>
        <?php endif; ?>
        </div></div>

    Thank you! Now, I’ll just write out instructions for the future authors of the blog about adding custom keys and what not.

    Thread Starter zoblue

    (@zoblue)

    Thank you so so much! I’m going to try it and will let you know if it works, which I’m sure it will! 😀

    This is what I want to do as well, however, I want to go a step further! It’s a challenge…

    I’m using background images for each item in the wp_list_pages so each item is different. For example, each link is a button with white text but when you are on a particular page I want the link to become blue text with an icon next to it, like so….

    HOME PAGE NAVIGATION
    [* home] [archives] [about] [stats] [contact]

    ABOUT PAGE NAVIGATION
    [home] [archives] [*about] [stats] [contact]

    I cannot achieve this using wp_list_pages because the class “current_page_item” has to be different for each item in the list. Right now, the home button is “active” on every page on my blog because it’s hard-coded that way in header.php and can’t be coded differently for each page.

    My second question is how do I add the home page as a ‘page’ so it shows up in the wp_list_pages with the styles added accordingly.

    Please let me know if I’m not making sense! You can check my blog if you’d like to see how I have hard-coded the navigation:
    http://blog.zoblue.com/

    I’m thinking this is going to involve some kind of PHP-read-the-url-and-auto-magically-add-the-style-needed. I just don’t have the advanced know-how. 😀

    Forum: Plugins
    In reply to: Page Excerpts in Pages?
    zoblue

    (@zoblue)

    Thank you MichealH for posting links!

    On the keyboard, the backtick is right next to the 1 key. It has the tilde on top ~ and the backtick on the bottom. The backtick won’t show up on this post though, but it works for doing code in posts.

    😉

    This is IE’s lovely Duplicate Character bug:
    http://www.positioniseverything.net/explorer/dup-characters.html

    Thread Starter zoblue

    (@zoblue)

    In the Auto Close Comments script, all I had to do was edit the line below and add , ping status = ‘closed’ like so:

    $wpdb->query ("UPDATE $tableposts SET comment_status = 'closed', ping_status = 'closed' WHERE post_date < '$cutoff_date' AND post_status = 'publish'");

    That way all posts’ comments and pings are closed and you don’t get any spam comments or pings/trackbacks on old posts. Right? Sounds right to me. :p

    Thread Starter zoblue

    (@zoblue)

    So now the question becomes: how to edit the Auto Close Comments script to also auto close a post’s ping_status? I’ll give it a try tonight, but I don’t feel very smart today. :p

    Thread Starter zoblue

    (@zoblue)

    My archives page for February can more clearly show what I’m talking about above: http://blog.zoblue.com/2005/02/

    Also, I checked my WP database and I compared the entries that have the comments OFF to the entries that have the comments CLOSED. The wp-posts table shows the comment_status as closed in both cases. However, does the ping_status have any affect on the comments being shown as off vs. closed?

    I bet that’s what it is, the entries that have the ping_status as closed show the comments as being “off.”

    Thread Starter zoblue

    (@zoblue)

    Ah, perfecto! Thank you dear, that saved a lot of headaches! 😉

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