struggling to order by title
i have the following page https://gundog.world/my-favorites/ (to view,user=stack pass=exchange) the page functions correctly but i am trying to put the generated list into ascending order by post title. i have tried numerous $args but not seem to be correct. can any one see any obvious errors? please be kind this is only a hobby. many thanks in advance
the list generated are post types ,i am usinng the titles of the posts plus a few fields.
?php
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
$args = array( 'orderby' = 'title', 'order' = 'ASC', );
$object_id = $item-object_id ;
$object_type = $item-object_type;
$field = get_field('label', $object_id);
$value = $field['value'];
$label = $field['label'];
$user_id = get_current_user_id();
echo 'li class=cbxwpbookmark-mylist-item '.$sub_item_class.' style=text-align: center !important; list-style:none !important;';
?
div style=background: #dff0d8; border-radius: 5px; border:black 3px solid;padding: 15px; margin-bottom:10px;
h2 class=club_titlediv style=padding-top: 15px;?php do_action( 'cbxwpbookmark_bookmarkpost_single_item_start',$args,$object_id, $item );
echo 'a href=' . get_permalink( $object_id ) . '' . get_the_title( $object_id ) . '/a' . $action_html;
do_action( 'cbxwpbookmark_bookmarkpost_single_item_end', $object_id, $item );?/div/h2
?php $field = get_field_object('subs_due_for_renewal_on', $object_id);
echo 'div class=due_on'.$field['label']; ??php echo $field['value'].'/div'; ?
?php
$buttons = array(
'subs_paid' = 'Subs Paid: ',
'sched_rec' = 'Schedule Received: ',
'tri_ent' = 'Trials Entred: '
);
foreach($buttons as $key = $val){
$m_val = ucfirst(get_user_meta( $user_id, $key.'_'.$object_id, true ));
$a_class = '';
if( empty( $m_val ) ){
$m_val = 'No';
}
else if($m_val == 'Yes'){
$a_class = 'is_active';
}
echo 'button class=button button_toggle '.$a_class.' data-user_id='.$user_id.' data-meta_key='.$key.'_'.$object_id.' data-meta_value='.$m_val.'span'.$val.' span class=status'.$m_val.'/span/span/button';
}
echo 'button class=button clear_line data-user_id='.$user_id.' data-option_id='.$object_id.'Clear Selections/button';
?
/div
?php
echo '/li';
*emphasized text*