Query by post type or category
Found solution $posts = array_merge($posts1, $posts2); function cmp($a, $b) { return strcmp($a->post_title, $b->post_title); } usort($posts, ‘cmp’);
Found solution $posts = array_merge($posts1, $posts2); function cmp($a, $b) { return strcmp($a->post_title, $b->post_title); } usort($posts, ‘cmp’);
You’ll need to ensure that The Loop includes the_content(); See: http://codex.wordpress.org/The_Loop
You can simply do it by wrapping closing divs in if condition where current_post is equal to 2. I have added it in following code <?php if ($query ->current_post == 0) { ?> <div> Post # 1</div> <?php } ?> <?php if ($query ->current_post == 2) { ?> <div class=”extra”> <div class =”extra2> <?php } … Read more
Diagnosing a connection reset problem
On some themes the Disqus code is rendered at a bad position within the loop. Go to the Disqus plugin within WordPress, click the “Advanced options” tab, and then check “Output javascript in footer”. That should fix this.
Eleven40 does not contain these styles in the style sheet. Paste all the styles listed on the tutorial page just above this line (in the child theme style.css file): /* Inner ———————————————————— */ Follow the other steps specified in the tutorial and you are set.
You can use the plugin Debug Objects, this have a option to get outside the templates, folder, file etc. and much more. Makes easier to debug a installed site.
Multiple homepage layouts as selected by user from theme options
Taxonomy.php is the default template that displays how custom taxonomies display in the browser. They aren’t how you create a new taxonomy. This is done by using the function register_taxonomy() in functions.php. WordPress has created a whole codex page on the topic available here. SmashingMag has a great tutorial on it as well (it’s actually … Read more
have_posts() iterates over all posts found and actually returned in the query which depend in the posts_per_page parameter. And for your second question, using query_posts() does overwrite the query and its not really the recommend method to alter or modify the query result, here is a nice question that explains better ways : When should … Read more