cooldude3663
Forum Replies Created
-
Forum: Plugins
In reply to: One post per categoryAh cool, thanks alot for ALL your help guys. Where do I stick that shortcode though?
Forum: Plugins
In reply to: One post per categoryI actually think it maybe my installation or something, because I used the default theme and nothing happened. (I added the code in the relevant section when swaping themes.)
Forum: Plugins
In reply to: One post per categoryI just tried to use the default theme, and used that code in single.php and still nothing.
Forum: Plugins
In reply to: One post per category<?php /* Mystique/digitalnature */ get_header(); ?> <!-- main content: primary + sidebar(s) --> <div id="main"> <div id="main-inside"> <!-- primary content --> <div id="primary-content"> <strong><?php $args=array( 'cat' => 4, 'post_type' => post, 'post_status' => 'publish', 'showposts' => 1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php the_content(); endwhile; } //if ($my_query) wp_reset_query(); // Restore global post data stomped by the_post(). ?></strong> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="page-navigation"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> <div class="clear"></div> </div> <!-- post --> <div id="post-<?php the_ID(); ?>" <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?>> <?php if (!get_post_meta($post->ID, 'hide_title', true)): ?><h1 class="title"><?php the_title(); ?></h1><?php endif; ?> <div class="post-content clearfix"> <?php the_content(__('Read the rest of this entry »', 'mystique')); ?> </div> <?php wp_link_pages(array('before' => '<div class="page-navigation"><p><strong>Pages: </strong> ', 'after' => '</p></div>', 'next_or_number' => 'number')); ?> <?php $posttags = get_the_tags(); if ($posttags): ?> <div class="post-tags"> <?php the_tags(__('Tags:','mystique').' ', ', ', ''); ?></div> <?php endif; ?> <div class="post-meta"> <?php if(get_mystique_option('sharethis') && get_mystique_option('jquery')) $share = true; if ($share) shareThis(); ?> <div class="details<?php if($share):?> share<?php endif; ?>"> <?php printf(__('This entry was posted on %s at %s, and is filed under %s. Follow any responses to this post through %s.', 'mystique'), get_the_time(get_option('date_format')),get_the_time(get_option('time_format')), get_the_category_list(', '), '<a href="'.get_post_comments_feed_link($post->ID).'" title="RSS 2.0">RSS 2.0</a>');echo ' '; if (('open' == $post-> comment_status) && ('open' == $post->ping_status)): // Both Comments and Pings are open printf(__('You can <a%s>leave a response</a> or <a%s>trackback</a> from your own site.', 'mystique'), ' href="#respond"',' href="'.trackback_url('',false).'" rel="trackback"'); elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)): // Only Pings are Open printf(__('Responses are currently closed, but you can <a%s>trackback</a> from your own site.', 'mystique'), ' href="'.trackback_url('',false).'" rel="trackback"'); elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)): // Comments are open, Pings are not _e('You can skip to the end and leave a response. Pinging is currently not allowed.','mystique'); elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)): // Neither Comments, nor Pings are open _e('Both comments and pings are currently closed.','mystique'); endif; ?> <?php edit_post_link(__('Edit this entry', 'mystique')); ?> </div> <div class="clear"></div> </div> </div> <!-- /post --> <?php endwhile; endif; ?> <?php include(TEMPLATEPATH . '/lib/post-meta.php'); ?> <?php comments_template(); ?> </div> <!-- /primary content --> <?php get_sidebar(); ?> <div class="clear"></div> </div> </div> <!-- /main content --> <?php get_footer(); ?>This is my current code.
Forum: Plugins
In reply to: One post per categoryYeah I was a bit hastey on the ctrl + P there; it seems to have been implemented well, however all the posts of that category are still showing on the page.
Forum: Plugins
In reply to: One post per categoryBtw thank you so so so much for your help so far. It is really really appreciated.
Forum: Plugins
In reply to: One post per categoryIt comes up with an error on line 29 error } expected. Which is: } //if ($my_query)
Forum: Plugins
In reply to: One post per category<?php /* Mystique/digitalnature */ get_header(); ?> <!-- main content: primary + sidebar(s) --> <div id="main"> <div id="main-inside"> <!-- primary content --> <div id="primary-content"> <strong><?php $args=array( 'cat' => 2, 'post_type' => post, 'post_status' => 'publish', 'showposts' => 1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php the_content(); endwhile; } //if ($my_query) } // foreach wp_reset_query(); // Restore global post data stomped by the_post(). ?></strong> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="page-navigation">The bold code is the code you gave me, this code goes before the loop in Single.php correct?
Forum: Plugins
In reply to: One post per categoryCant find anything in regards to only showing one post for one specific category. I tried using the code you posted for a issue of the same nature, before the loop but to no avail.
Forum: Plugins
In reply to: One post per categoryWell the site is http://www.mysterious-girl.net
NSFW
NSFWForum: Plugins
In reply to: One post per categoryUmm first of its a NSFW site, I want it to take place on the front page, I want the category to be the second categor which is called Picture of the Day and the theme is Mystique.
http://wordpress.org/extend/themes/mystiqueForum: Plugins
In reply to: Plugin for Picture of the DayI tried using that but it keeps saying API key error 100.
Forum: Plugins
In reply to: Only one post from category on Front Page ?<div id=”main”>
<div id=”contentwrapper”>
<?php
//show one post from category 3, enforce paging
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
query_posts($query_string . ‘&cat=1&showposts=1&paged=’$paged);
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>I have the code like this but I am still getting 50 posts from one category.
Forum: Plugins
In reply to: Only one post from category on Front Page ?Which php file is this in? I am a complete noob and want 1 specific category to only show one post. I am using it to create a picture of the day.