• I recently upgraded to “Now Reading Reloaded” from “Now Reading” and now my library page won’t sort by title. All of my other customizations have been moved over from the old version to the new version except that. Now it sorts by date added which isn’t useful to me. I haven’t changed the code and it was working before I upgraded. Is there a way of changing it so the entries list by title in the library? Here is my library.php code which was working before the upgrade (located in templates folder):

    <?php get_header() ?>
    
    <div class="content">
    
    	<div id="content" class="now-reading primary narrowcolumn">
    
    	<div class="entry_body">
    
    		<?php if( can_now_reading_admin() ) : ?>
    
    			<p>Admin: &raquo; <a>"><?php __('Manage Books', NRTD);?></a></p>
    
    		<?php endif; ?>
    
    		<?php library_search_form() ?>
    
    		<h4>My Library (<?php echo total_books('unread', 0) ?>):</h4>
    
    		<?php if( have_books("title={$GLOBALS['nr_title']}&num=-1") ) : ?>
    
    <ul>
    			<?php while( have_books("title={$GLOBALS['nr_title']}&num=-1") ) : the_book(); ?>
    
    <li><a>"><?php book_title() ?></a> by <a>"><?php book_author() ?></a></li>
    			<?php endwhile; ?>
    
    </ul>
    		<?php else : ?>
    
    			<p>None</p>
    
    		<?php endif; ?>
    
    		<h4>Wish List (<?php echo total_books('reading', 0) ?>):</h4>
    
    		<?php if( have_books('status=reading&orderby=title&num=-1') ) : ?>
    
    <ul>
    			<?php while( have_books('status=reading&ordberby=title&num=-1') ) : the_book(); ?>
    
    <li>
    					<p><a>"><img src="<?php book_image() ?>" alt="<?php book_title() ?>" /></a></p>
    					<p><a>"><?php book_title() ?></a> by <a>"><?php book_author() ?></a></p>
    				</li>
    			<?php endwhile; ?>
    
    </ul>
    		<?php else : ?>
    
    			<p>None</p>
    
    		<?php endif; ?>
    
    		<?php do_action('nr_footer'); ?>
    
    	</div>
    
    	</div>
    
    </div>
    
    <?php get_sidebar() ?>
    
    <?php get_footer() ?>

    https://www.ads-software.com/extend/plugins/now-reading-reloaded/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter witchkitten

    (@witchkitten)

    I wanted add that I’ve tried changing the file in the templates folder and the one in the “now-reading” folder in the individual theme folder. It is now changed in the “now-reading” folder. All of the other customizations I’ve made (ex: listing by “title by author” and header name changes) are showing up. Just thought I’d clarify.

    Thread Starter witchkitten

    (@witchkitten)

    I found that if I changed the code from

    <?php if( have_books("title={$GLOBALS['nr_title']}&num=-1") ) : ?>

    to

    <?php if( have_books('status=unread&orderby=title&num=-1') ) : ?>

    then it does sort by title but now it doesn’t ignore “the”, “a”, and “an” at the beginning of the title. Is there a way to sort by title ignoring “the”, “a”, and “an” at the beginning of the title?

    I think a change like that would be a change to the backing query, which I can’t officially support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Now Reading Reloaded] Library Sort by Title’ is closed to new replies.