zoblue
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error in options table@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!
Forum: Plugins
In reply to: get_post_meta and Daiko’s Text WidgetI 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!
Forum: Fixing WordPress
In reply to: Just want to upload image (no post or page)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:
https://kpumuk.info/projects/wordpress-plugins/ad-rotator/Forum: Fixing WordPress
In reply to: Just want to upload image (no post or page)So, maybe this isn’t possible? Just wonderin’ ??
Forum: Fixing WordPress
In reply to: howto? monthly featured article in sidebarI’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.
- Category: your super special category
and it must match what’s in the php code! - Add two key/value combos:
- Key: thumbnail
Value: https://url/to/thumbnail -
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!
Forum: Fixing WordPress
In reply to: howto? monthly featured article in sidebarSuccess! 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.
Forum: Fixing WordPress
In reply to: howto? monthly featured article in sidebarThank you so so much! I’m going to try it and will let you know if it works, which I’m sure it will! ??
Forum: Fixing WordPress
In reply to: Style current Page differently for wp_list_pages?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:
https://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?Thank you MichealH for posting links!
Forum: Themes and Templates
In reply to: Could any expert help me ???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.
??
Forum: Installing WordPress
In reply to: Small Mark in the middle of my postsThis is IE’s lovely Duplicate Character bug:
https://www.positioniseverything.net/explorer/dup-characters.htmlForum: Fixing WordPress
In reply to: Comments Off vs. comments closed?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
Forum: Fixing WordPress
In reply to: Comments Off vs. comments closed?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
Forum: Fixing WordPress
In reply to: Comments Off vs. comments closed?My archives page for February can more clearly show what I’m talking about above: https://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.”
Forum: Themes and Templates
In reply to: Make separate page based on templates?Ah, perfecto! Thank you dear, that saved a lot of headaches! ??
- Category: your super special category