One Crayon
Forum Replies Created
-
Forum: Plugins
In reply to: How to: Customizing page2cat markup via a templateFurther testing has revealed a couple limitations of the original code posted above, and this damn forum doesn’t let me edit posts, so here’s the corrections:
General snippet:
if (get_query_template('page2cat') != '') { include(get_query_template('page2cat')); }Plugin page2cat.php file:
case 'getpost': ?> <div id="category-page-header"> <?php $post = $post_temp; $post = get_post($pageid); setup_postdata($post); if($post->post_title!=""){ if (get_query_template('page2cat') != '') { include(get_query_template('page2cat')); } else { ?> <div id="p2c-header"> <h1><?php echo $post->post_title; ?></h1> <?php the_content(); ?> </div> <div class="category-page-cleaner"></div> <?php } echo '</div>'; $post = $post_temp; } break;Theme page2cat.php file:
<div id="p2c-header"> <h1><?php echo $post->post_title; ?></h1> <?php the_content(); ?> </div>Forum: Requests and Feedback
In reply to: Registration Approval/ModerationHere’s another possible workaround, although not particularly elegant:
Install the Category Access plugin, and set both the New Users and Anonymous Users sections to reveal only the public areas of the site. Then have a mechanism in place for people to request full access and you can just update that user’s profile to display the disallowed categories. Downside, you still have to deal with each user individually. Upside, you can customize exactly what categories are visible versus invisible, or visible and locked, which is a step in the right direction, at least. The plugin:
Forum: Fixing WordPress
In reply to: “How To” Present Single Category on Separate Page?Ack, forgot to cose a code tag, sorry about that. I’d edit it if I could.
Forum: Fixing WordPress
In reply to: “How To” Present Single Category on Separate Page?If you don’t like IanD’s answer, and want to use the category archive:
– Exclude category 3 from the index:
<?php if ( !in_category('3')) { ?>
- Create a link to category 3 wherever it is that you want the link. One possibility is to use list_cats()
- Create a template file namecategory-3.php, and in that file use the same page layout template that you have on your index, minus any main-page specific code (like the excluding if statement)If I had my site fully converted to WordPress, I'd toss you a link for an example, but it's not up and running completely yet.
Forum: Fixing WordPress
In reply to: Displaying post archive links from only one category?Beautiful, thank you so much. That’s exactly what I needed.
Forum: Fixing WordPress
In reply to: “How To” Present Single Category on Separate Page?I would exclude category 3 from the
index.phploop, and then link to the category’s archive page from somewhere on the main page. You can set up a template page calledcategory-3.phpin order to have the category page display the same stuff as the index instead of defaulting to the archive template, as well. That way you don’t need to bother with excluding all the other categories, and you get a page for just that category.