grpsmglr00
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: Category Page] Category to appear within page?I ended up turning it into a plugin that can be used in conjunction with cat2page. You can read about it and download it here:
Forum: Fixing WordPress
In reply to: odd display problem with dashboardI figured it out…once you mentioned the CSS issue I check out the source code and it turns out one of my plugins GWA db editor was adding their style sheet and it was throwing everything off.
Forum: Plugins
In reply to: Should update the plugin or make a new one?can anyone help??
Forum: Plugins
In reply to: [Plugin: Category Page] Category to appear within page?jageo,
I’ve been working on the same problem and today I finally got it. I hope to turn it into a plugin add on for Category Page.
I installed the Category Page plugin and link my pages to the categories (you must do this). Then I created a Page Template. Below is the code for the Page template. The hard part was figuring out the navigation if you don’t want all the post to show up at once.
Keep in mind that I just figured this out today so it’s still rough and some of the formatting code is theme specific but I’m sure it will still work.
Here’s the code:
<?php /* Template Name: Category Page Template */ ?> <?php get_header(); ?> <div id="side-left"> <div id="content"> <?php $current_page = $_GET['posts_page']; $display_num = $_GET['display_num']; ///Enter default number of posts to display at once here (enter -1 to display all): $default_display = 2; //Permalink for page scrolling $base_link = get_permalink(); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="kutu"> <div class="ust"><span></span></div> <div class="post" id="post-<?php the_ID(); ?>"> <h2 class="pagetitle"><?php if ($page_id=="29") echo ""; else the_title(); ?></h2> <div class="entry"> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?> </div> </div> <?php endwhile; endif; ?> <?php edit_post_link('Edit this entry.', '<p style="margin:10px;">', '</p>'); ?> <?php $cur_page = $post->ID; $query_catID = $wpdb->get_var("SELECT cat_ID FROM $wpdb->page2cat WHERE page_ID=$cur_page"); ?> <!--For Post Listing--> <?php if ($current_page > "0"){ } else { $current_page = 1; } if ($display_num > "0") { } else { $display_num = 2 ; } // echo 'page=' . $current_page; $offsetnum = ($display_num * ($current_page - 1)); // echo 'offset=' . $offsetnum; $query = 'cat=' . $query_catID . '&showposts=' . $display_num. '&offset=' . $offsetnum; ?> <div class="page-post-listing"> <?php query_posts($query); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <span style="padding-left:5px;" id="post-<?php the_ID(); ?>"><?php the_date('n/j'); ?> - <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></span> <?php echo $this_link; ?> <div class="entry" style="border-bottom:1px dashed #efe7cc;"> <?php the_excerpt(); ?> </div> </div> <?php endwhile; endif; ?> </div> <div class="clear" /> <!--For Post Count--> <?php $post_count = $wpdb->get_var("SELECT count FROM $wpdb->term_taxonomy WHERE term_id=$query_catID"); $aa = $post_count / $display_num ; $bb = intval($aa); if ($aa == $bb) { $num_of_pages = $bb; } else { $num_of_pages = $bb + 1; // echo 'num of pages=' . $num_of_pages; // echo '<br />'; // echo get_permalink(); } if ($num_of_pages > 1){ echo '<div style="color:#d31145; text-align:right; padding:5px;">'; echo '<ul style="border-top: 1px solid #efe7cc;">'; if ($current_page > 1) { echo '<li style="display:inline;"><a href="' . $base_link . '?posts_page=' . ($current_page - 1) . '&display_num=' . $display_num . '"><<</a></li>'; } $pg_count = 0; while ($pg_count < $num_of_pages) { $pg_count += 1; echo '<li style="display:inline;">'; if ($pg_count == $current_page){ echo '<span style="color:#d31145; font-weight:bold;">' . $pg_count . '</span></li>' ; } else { echo '<a href="' . $base_link . '?posts_page=' . ($pg_count) . '&display_num=' . $display_num . '">' . $pg_count . '</a></li>'; } } if ($current_page < $num_of_pages){ echo '<li style="display:inline;"><a href="' . $base_link . '?posts_page=' . ($current_page + 1) . '&display_num=' . $display_num . '">>></a></li>'; } echo '</ul></div>'; } ?> </div> </div></div></div> <?php get_sidebar(); ?> <?php get_footer(); ?>Forum: Fixing WordPress
In reply to: HOW TO: Change Category ID’s in WordPress 2.7you can also download the [GWA] db Editor plugin and access the database directly in the wp-admin.