nadine00
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Make a metabox that let's users select a link categoryAnyone? Bueller…..? Bueller…?
Forum: Fixing WordPress
In reply to: Events Archive with Monthly HeadersUpdated, but its still just echoing January and not the right month, what am I missing? Anyone?
<?php $args = array( 'post_type' => 'events', 'orderby' => 'meta_value', 'meta_key' => 'tf_events_startdate', 'order' => 'DESC' ); $my_query = new WP_Query($args); if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); $custom = get_post_custom(get_the_ID()); // dates $sd = $custom["tf_events_startdate"][0]; $ed = $custom["tf_events_enddate"][0]; // - local time format - $time_format = get_option('time_format'); $stime = date($time_format, $sd); $etime = date($time_format, $ed); // set headers if(!isset($currentMonth) || $currentMonth != date("m", strtotime($sd))){ $currentMonth = date("m", strtotime($sd)); echo '<h2>'.date("F", strtotime($sd)).'</h2>'; }?> <ul> <li> <strong><a href="<?php the_permalink();?>"><?php the_title();?></a></strong> <br /> <?php // - determine if it's a new day - $longdate = date("l, M j, Y", $sd); if ($daycheck == null) { echo $longdate; } if ($daycheck != $longdate && $daycheck != null) { echo $longdate; } ?> <br /> <?php echo $stime;?> <hr /> </li> </ul> <?php endwhile; else: ?> <ul id="events"> <li><?php _e('No Events Yet .'); ?></li> </ul> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Make a metabox that let's users select a link categoryHave this mostly solved, just looking for a way to visually keep the selected option as selected…anyone?:
function tf_book_purchase (){ global $post; $custom = get_post_custom($post->ID); $link = $custom["link"][0]; $selected = isset( $custom['link'] ) ? esc_attr( $custom['link'][0] ) :''; echo '<div class="link_header">'; $myterms = get_terms("link_category"); echo '<select name="link" id="link">'; echo '<option class="buy_books">Select A Link Category</option>'; foreach($myterms as $term){ $term_slug=$term->slug; $term_name =$term->name; $term_id =$term->term_id; ?> <option value="<?php echo $term_id;?>" <?php selected( $selected, ".$term_id." ); ?>><?php echo $term_name;?></option> <?php } echo '</select><br /></div>'; echo '<p>Please select a set of purchase links for this book.</p>'; } add_action ('save_post', 'save_tf_book_purchase'); function save_tf_book_purchase() { global $post; // make sure we're on a supported post type if ( $_POST['post_type'] != 'books' ) return; // verify this came from our screen and with proper authorization. if ( !wp_verify_nonce( $_POST['book_nonce_name'], 'book-nonce' )) return; // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return; // Check permissions if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_page', $post_id ) ) return; } else { if ( !current_user_can( 'edit_post', $post_id ) ) return; } //if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE){ return $post->ID; } update_post_meta( $post->ID, 'link', esc_attr( $_POST['link'] )); }
Forum: Themes and Templates
In reply to: Pagination issues on Custom Post Types – 404 pagesFound a solution. Set the read settings to 1 in the admin. While this isn’t the best all round solution. I’m making a stripped down admin where users don’t have access to reading settings. So it works in this scenario:
https://wordpress.stackexchange.com/questions/22528/custom-post-type-pagination-404-fix
Forum: Fixing WordPress
In reply to: Turning off Multiple Images…Anyone? Bueller…?
Forum: Fixing WordPress
In reply to: Media Library – why are there 4 versions of every image?I think what’s annoying is that wordpress will make extra images, but not add them to the media library. So you have all these images, which is handy that it does that, but then they just sit in the folder, un-added and un-manageable, and most of the time un-noticed.
Is there a plugin or a better way to better manage wordpress images? I’m already using add from server, but I find media handling is WPs weak area.
Forum: Fixing WordPress
In reply to: post type not supporting tagsFound it.
Forum: Fixing WordPress
In reply to: Stop WP from auto inserting tagsAnyone? Bueller?
Forum: Fixing WordPress
In reply to: merged posts lost all their feature images…Just went in and updated all posts by hand. Maybe there will be a plugin in the future or something.
Forum: Fixing WordPress
In reply to: Import Feature Does Not Import File AttachmentsWoo! Same here. My issue is thumbnails tho, WP just went off and un-attached all the feature images. Did a bunch of SQL queries, fixed a bunch of URLs…zip.
Frustrating indeed.
Forum: Fixing WordPress
In reply to: merged posts lost all their feature images…So it seems like wordpress just went ahead and lost all the image attachments to posts. I’ve been doing some URL replacements, but to no avail. Any suggestions on where to look for this?
Or else its going through 200+ posts and _re-attaching thumbnails_ which does not sound very appealing, and being that I have no attention for admin detail I will likely attach the wrong thing to the wrong place somewhere and someone will have a bird-dog.
Suggestions?
Forum: Fixing WordPress
In reply to: wordpress isn't playing nice with php.iniOver a day ago.
The thing tho is if you do it on bitnami, you just restart your own local server. After restarting the local server, it still wasn’t picking up the new setting.
Also: deleting the self-done php.ini from dreamhost causes WP just go back to 7MB right away. No “I can’t upload that 600kb pdf” warning.
Which is why I’m starting to think its a bug of some kind.
Forum: Fixing WordPress
In reply to: sidebar widgets don't transfer with rest of site?Oh ok, this is likely the problem. Thanks for the tip.
Forum: Fixing WordPress
In reply to: Help: Pulling articles based on a custom taxonomy / termFound it!
Forum: Themes and Templates
In reply to: tag.php acting weird with custom post typesSo apparently, this is a bug: https://core.trac.www.ads-software.com/ticket/14589
And this, which I found over at stackexchange is a good fix.
<?php function post_type_tags_fix($request) { if ( isset($request['tag']) && !isset($request['post_type']) ) $request['post_type'] = 'any'; return $request; } add_filter('request', 'post_type_tags_fix');?>