Objective: To simulate “filtering” what is displayed on the main/front page.
I will be making regular posts in 3 main categories on my site. Those are Meanderments, Ponderments, and Ponder Live!.
Using the buttons along the top. I want it to “feel” as though nothing is changing except for the content being displayed when switching between each of those three categories.
I’ve tried accomplishing this a number of ways, yet each one falls short only slightly.
As you see it now, this is how I would like it to display the posts, when switching in between the three top menu buttons (Meanderments, ponderments, and Ponder live!). This is the closest I have gotten to achieving my goals. I fall short only in aesthetics. In its current form, the buttons on the menu do not stay highlighted after selection. Making it difficult to decern the filter currently being applied to the post view.
The reason it does this is…
Method 1) <i>(this is the method I’m currently using)</i> In this method I used the Forwarding plugin. I then set each of those three pages to forward to the category view of that category correlating with its name. Thus, because the view forwards, and ends up on a category view it does not highlight the top-menu button. Also to achieve the look of only the articles showing I had to modify the Archive.php to not display any headline for those three categories.
Method 1 problem: Top-menu items do not stay highlighted (though the other buttons such as About Ponder Place do)
Method 2) In this method I copied and modified the code from Archive.php and created templates for each category, named like “category-#.php” correlating with the database IDnumber for the 3 categories. I then added in the code ‘<?php query_posts(‘category_name=categoryname&showposts=10′); ?>’ in order to pull the appropriate category content.
I then set each page to use its own template modified for its own category.
Method 2 problem: Something in the Archive.php code was stripping it from using the
<!--more-->function. Thus my posts were showing up in full form, minus pictures. I believe this is due to the Archive being set to pull the_excerpt(). Which I’ve been unsuccessful in modifying to show full post content instead.
I hope I’ve made sense.
Again, as the site stands right now, as function and post display goes is how i want it. It is just not highlighting those top-menu buttons.
- The topic ‘Filter posts on Home view – my solutions and failures.’ is closed to new replies.