Specific Post Format Image Thumbnail

From your comment: This is all I meant: add_image_size( ‘index-thumb’, 640, 250, true ); add_image_size( ‘image-format’, 630, 9999, true ); So, let’s assume you create custom image sizes for gallery and video (as well as a “default” size, which we’ll call standard), perhaps like so: <?php add_image_size( ‘index-standard’, 640, 250, true ); add_image_size( ‘image-gallery’, 630, … Read more

Featured Image Thumbnail Sizing

I’ve approached this problem in a few different ways, here’s some ideas: Just grad the medium sized thumbnail with the_post_thumbnail(‘medium’); (or any defined size that is bigger than what you want displayed), and apply a .inner .thumb img {width: 153px; height: auto;} css rule. If it’s too tall it will get cropped from your overflow:hidden; … Read more

phpBB 3 to bbPress

Never mind now. Fortunately (in this case) I have found an alternative solution to bbPress for WordPress – Simple:Press! I personally think that Simple:Press is much better not only because it allowed me to import everything from phpBB very easily but also because it seems much more comprehensive and well put together; – more comparable … Read more

Generate multiple tag query URLs

$url = parse_url( $your_url ); $query = $url[‘query’]; $args_arr = array(); parse_str( $query, $args_arr ); if( isset( $args_arr[‘param’] ) ) { $query_string = $args_arr[‘param’]; $query_string .= ‘,value2’; } else { $query_string = ‘value2’; } add_query_arg( ‘param’, $query_string ); That’s completely untested, but you get the concept. Basically, wordpress is gonna want to replace what you … Read more

Form validation on user profile edit

I worked it out. add_action( ‘user_profile_update_errors’, ‘validate_steamid_field’ ); function validate_steamid_field(&$errors, $update = null, &$user = null) { if (!preg_match(“/^STEAM_[0-5]:[01]:\d+$/”, $_POST[‘_bbp_steamid’])) { $errors->add(’empty_steamid’, “<strong>ERROR</strong>: Please Enter a valid SteamID”); } }

Get Child category “name” of post

menardmam, this is my solution: <?php $showPostsInCategory = new WP_Query(); $showPostsInCategory->query(‘cat=”. $carouselCategory .”&showposts=”. $carouselNumber .”‘); if ($showPostsInCategory->have_posts()) : while ($showPostsInCategory->have_posts()) : $showPostsInCategory->the_post(); ?> <li> <?php $data = get_post_meta( $post->ID, ‘key’, true ); ?> <?php foreach((get_the_category()) as $category) {echo ( $category->cat_name != $carouselCategory ) ? $category->cat_name . ‘ ‘ : ”;}?> <a href=”https://wordpress.stackexchange.com/questions/45198/<?php if ($data[“custom_link’ ]) … Read more