Community Forums › Forums › Archived Forums › Design Tips and Tricks › Post Title Links or Dropdown at Top of Category Archives
Tagged: category archive, display posts shortcode
- This topic has 4 replies, 2 voices, and was last updated 11 years, 8 months ago by
Au Coeur.
-
AuthorPosts
-
February 26, 2014 at 2:09 pm #92530
Au Coeur
MemberI have a client who is using category archives to organize a lot of posts on their website. They would like all post titles in each category to be available at the top of the category archive in either a list or a dropdown, so that any individual post can be found without scrolling. I know I can do this by adding a widget area to the top of each category and using a plugin like Featured Posts Amplified, but there are a lot of categories and I would love to set this up as a feature that is automatically available should the client create more categories in the future. Can anyone recommend a plugin? Or does anyone have an idea about how I might utilize Bill's display post shortcodes to and add this into the functions file?
http://enjoyrhinebeck.com/new/Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together, most recently from northern Colorado. Visit my blog or my design site.
April 15, 2014 at 9:12 am #100458Susan
ModeratorAs you posted this a while ago, I hope you got your issue resolved. If not, please let me know, and I will take a look (or escalate if I cannot help).
If it is resolved, please mark it resolved, so that the thread can be closed.
Thanks!
April 15, 2014 at 10:38 am #100503Au Coeur
MemberNope, never got it resolved.
Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together, most recently from northern Colorado. Visit my blog or my design site.
April 15, 2014 at 10:39 am #100504Au Coeur
Member...I also never spent a lot of time trying to figure it out with Bill's plugin.
Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together, most recently from northern Colorado. Visit my blog or my design site.
May 15, 2014 at 12:11 am #105224Au Coeur
MemberHi Susan,
I am working on this now. The problem I seem to have is related to the current category generation. I am trying to use this code:
//* Add List Above Category Archives function post_list_on_category_archive() { if ( is_category() ) { echo '<div class="before-category">'; echo do_shortcode( '[display-posts posts_per_page="-1" order="ASC" orderby="title" columns="2" category="$category_id"]' ); $category_id = get_query_var( 'cat' ); echo '</div>'; } }; add_action('genesis_before_content', 'post_list_on_category_archive');If I remove "category=..." the short code will display as expected. But for some reason adding in category="$category_id" returns nothing where the shortcode should be.
Thoughts?
Mother. Web & Graphic Designer. Lactation Consultant. Blogging about how it all fits together, most recently from northern Colorado. Visit my blog or my design site.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.