WordPress.org

Ready to get started?Download WordPress

Forums

Search by title (1 post)

  1. maarten_nrg
    Member
    Posted 1 year ago #

    Hi,
    Is there a way to filter (search) on the post title, including wildcard brackets '%' or LIKE?

    Example:

    $args['name'] = '%'.$search_term.'%';
    $loop = new WP_Query( $args );
    if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post();

Topic Closed

This topic has been closed to new replies.

About this Topic