WordPress.org

Ready to get started?Download WordPress

Forums

My Content Management
Glossary Display Functionality Bug (5 posts)

  1. damainman
    Member
    Posted 2 years ago #

    Hello,

    1. I created a word press page in wp-admin and entered the following code:

    [alphabet]
    [my_content type='glossary' display='full' taxonomy='category_glossary' order='menu_order']

    2. Started adding terms and everything seemed great. Every term started with the letter "A".

    3. Until I decided, just for the sake of seeing how it looked a term which started with the letter "B". Viewed page, worked perfect!

    4. So I decided to continue finishing my A terms, and also finished the rest of my B terms right after.

    ---

    But when I looked at the web page, it now has 2 A sections and 2 B sections.

    Basically, in Step#3 above... once I started adding the rest of the "A" terms, all the terms got placed below the "B" term I added.

    On top of that, the rest of the B terms I finished via Step#4 above got placed below the rest of the A terms.

    So basically instead of:

    A
    apple
    axe
    arrow
    atom

    B
    ball
    basket
    bully
    Bill

    It looks like this:

    A
    apple
    axe

    B
    ball

    A
    arrow
    atom

    B
    basket
    bully
    Bill

    It is displaying the content in the exact order I added them instead of ordered by Name?

    I have tried all the following but it didn't solve the issue:

    [my_content type='glossary' display='full' taxonomy='category_glossary' order='menu_order']
    
    [my_content type='glossary' display='full' taxonomy='category_glossary' order='post_title']
    
    [my_content type='glossary' display='full' taxonomy='category_glossary' order='post_name']

    Thank you in advance for any advice!

    Site note:
    Just in case it is relevant, I currently have 27 terms but will be adding more if I can resolve this bug.

    http://wordpress.org/extend/plugins/my-content-management/

  2. damainman
    Member
    Posted 2 years ago #

    Also as another sort of related bug report, on:

    - mysite.com/glossary-category/social-glossary/

    It only displays a few of my terms with no way to browse other terms in that category.

  3. Joe Dolson
    Member
    Plugin Author

    Posted 2 years ago #

    The orderby parameter you're looking for is 'title'.

    On the second point, it's hard for me to say anything without knowing what type of page that is. This plugin doesn't really deal with theme issues, though.

    Best,
    Joe

  4. damainman
    Member
    Posted 2 years ago #

    Well Ouch!! I was trying to hard code the correct display into my template and you solved it with just one word :(. Thank you!! Btw I marked your plugin as working for 3.3.1 and will donate once my boss ever actually sends me the check :(.

    On a side note, for the 2nd issue. During my testing I think I may have figured out something similar so will post here in case it is a bug or just a weird quirk with my theme. In either case, no need to reply I just wanted to post my troubleshooting steps in case it makes anything click.

    1. First the link posted above is the default link that the plugin generates to view that specific glossary category.

    2. I found out by default, it only lists 10 terms but since the order was not ASC by the title it threw me off.

    3. I am not sure how your plugin generates the link above to display the terms for that specific glossary but if I hard code the following code into my template I get the same output as the page generated by your plugin:

    <?php
    
    // The Query
    $my_loop = new WP_Query( array ( 'post_type' => 'mcm_glossary') );
    
    // The Loop
    while ( $my_loop->have_posts() ) : $my_loop->the_post();
    	echo '<h3>';
    	the_title();
    	echo '</h3>';
    	the_content();
    	endwhile;
    
    // Reset Query
    wp_reset_query();
    ?>

    However if I change the query to the following

    $my_loop = new WP_Query( array ( 'post_type' => 'mcm_glossary', 'posts_per_page' => -1) );

    That is the only way it shows all the terms... So it seems like by default it only displays 10.

    Update:
    Okay I figured it out.

    1. On the glossary category page generated by the plugin which lists all the terms in that category.

    A. The list is not sorted alphabetically (title)
    B. It is sorted via "menu_order"

    C. It only showed 10 terms because that is the number I have saved in "wp-admin >> Settings >> Reading >> Blog pages show at most"

    If I change the number in that setting, the category page shows the amount I have there :).

    Well thanks again for the plugin and quick solution!!

  5. Joe Dolson
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, if you're using any native WordPress-generated archive page, it'll display using your normal WordPress settings. That page is fundamentally equivalent to a blog category page, and displays the same way - 10 items, displayed in the order posted, most recent first.

    If you create a custom theme file for that taxonomy you can modify it pretty extensively. Check out the WordPress template hierarchy map to figure out what you should name the file to get a custom taxonomy archive template:

    http://codex.wordpress.org/images/1/18/Template_Hierarchy.png

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic