Category pages vs single post pages
If I understand the question right, you should try with category template and for the “main” post you can use Sticky Post
If I understand the question right, you should try with category template and for the “main” post you can use Sticky Post
MySQL can do math but can’t pass it through query_posts like that, or any WordPress’ post query functions, which depend upon WP_Query. They will literally look for a table/column named, in your case, “meta_value_num / date”. To do it in SQL I believe– aka., this is untested– you’d have to do something like this: SELECT … Read more
function wpse81499_move_postcustom_to_top() { if( ‘post’ != get_current_screen()->id ) return; ?> <script> jQuery(document).ready(function(){ jQuery(‘#postcustom’).prependTo(‘#titlediv’); }); </script> <?php } add_action( ‘admin_footer’, ‘wpse81499_move_postcustom_to_top’ );
have you tried something like, $post_categories = wp_get_post_categories( $post -> ID ); foreach($post_categories as $c){ $cat = get_category( $c ); if ( $cat->slug != “cat” ) { echo “$cat->name”; }; }
This creates a custom meta box and the contents of the textarea field it contains are being saved as a comment to the post. Please note: Built with code sample adapted from the Codex. Relevant functions: add_meta_box and wp_insert_comment. I removed comment_author_IP and comment_agent from the insert comment arguments. Not sure of the consequences. Bug: … Read more
If you register the post type with public set to true, the titles will be included automatically. You shouldn’t have to do anything to make this happen. Something as simple as this from the Codex: function codex_custom_init() { $args = array( ‘public’ => true, ‘label’ => ‘Books’ ); register_post_type( ‘book’, $args ); } add_action( ‘init’, … Read more
Your best bet would probably be the Rewrite Endpoints API. The API allows you to create post URLs with endpoints like lorem.com/post/133/json/ or lorem.com/post/133/print/. You’ll find useful code examples in the link provided.
You may want to change your code to something like this: <a href=”https://wordpress.stackexchange.com/questions/83700/<?php the_permalink() ?>” class=”alignnone” title=”<?php the_title(); ?>”> <a href=”<?php the_permalink(); ?>” title=”<?php the_title();?>”> <?php if (has_post_thumbnail()) : ?> <?php the_post_thumbnail(); ?></a> <?php else : ?> <img src=”<?php bloginfo(‘template_url’); ?>/images/noimage.jpg” width=”213″ height=”187″ alt=””/> <?php endif; ?> </a> and I assume you’ve specified a Featured … Read more
try adding page like this on post type ‘post_type’ => array( ‘portfolio’, ‘page’ ) post_type can accept array… more of it here… http://codex.wordpress.org/Class_Reference/WP_Query#Type_Parameters
It sounds like your theme is using the_excerpt() instead of the_content() when displaying the post. If you want to display the full post you’ll need to edit your index.php file to use the_content() instead.