Support Forum » User Profile

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Create custom taxonomy archive template #23791
    rebecmarirebecmari
    Participant

    Thank you. This is resolved. I was able to modify this to work for me. Sample of the code is below, in case it is helpful to anyone:

    
    <?php
    global $wpdb;
    $term_id = get_queried_object_id();
    $ids = $wpdb->get_col( "SELECT ID FROM my_custom_table WHERE cemetery_records_cemeteries = $term_id" );
    
    $args = array( 
        'post_type' => 'cemetery-records',
        'post__in'  => $ids,
        'posts_per_page'=>20, 
        'orderby'=>'last_name',
        'order'=>'ASC', 
        'paged' => $paged
    );
    $loop = new WP_Query( $args )
    ?>
    
    in reply to: Import images into custom table #21157
    rebecmarirebecmari
    Participant

    Hi Long,

    Thanks for the reply! This worked great. I combined your suggestion with the MetaBox File Input field (instead of text), so future images can also be selected from the Media library, and it will list their url in the database.

Viewing 2 posts - 1 through 2 (of 2 total)