WordPress.org

Ready to get started?Download WordPress

Forums

WP Publication Archive
Widget - change list display from latest to newest. Is it possible? (3 posts)

  1. giovapol
    Member
    Posted 4 months ago #

    Hello,

    I would like to change the display list of my publication widget from latest to newest. Is it possible? I need some help!

    Thanks

    Giovani

    https://wordpress.org/plugins/wp-publication-archive/

  2. slb535
    Member
    Posted 4 months ago #

    Seconding this question. Tried changing things in class.wp-publication-archive.php to no avail.

    SEems like there's something very easy that I'm missing. I'd appreciate any help!

  3. clintcxf
    Member
    Posted 3 months ago #

    I wanted this as well and have just hacked the wp-publication-archive/lib/class.publication-widget.php file.

    Changed the code from

    if ( isset( $instance['orderby'] ) ) {
    			$query_args['orderby'] = $instance['orderby'];
    		}

    to

    /*	if ( isset( $instance['orderby'] ) ) {
    			$query_args['orderby'] = $instance['orderby'];
    		}*/
    $query_args['orderby'] = 'post_date';
    $query_args['order'] = 'DESC';

    Obviously only a temporary hack, maybe a better coder could integrate it into the plugin to get it working.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags