wp query – Display a specific category of products in the shop page

I want to display a specific category of products at the top of the store page.
By default, all products are displayed.
Appearance> Personalize> woocommerce
You can edit from here, but you couldn't do what you wanted.
What you want to do is:
1, display only related products of a specific category on the first page of the store page
2, from the category and tag link of each product page, it is displayed correctly on the store page. Products other than the product specific to a category selected in "1" are also displayed.
3, the search on the search console finds all the products. Currently, products other than the product linked to a specific category selected in "1" are also reflected in the search results.

To meet the above three conditions, I tried the code with reference to another question.
In the attached code, "1" and "2" were deleted, but "3" could not be deleted.
In other words, products that are not linked to a specific category will not be found in the search.
How can I make changes to find products other than products linked to a category?


function shop_filter_cat($query) {
if (!is_admin() && is_post_type_archive( 'product' ) && $query->is_main_query()) {
$query->set('tax_query', array(
array ('taxonomy' => 'product_cat',
'field' => 'slug',
'terms' => array( "https://wordpress.stackexchange.com/#","https://wordpress.stackexchange.com/#"), //

PHP / HTML table and modal forms that display information

It's been a while since I wrote PHP or HTML for a project, so I could use some thoughts on improving the code below. I wrote it all from old acquaintances, so I imagine it is really sloppy and can be written much cleaner. All the code below works. Here is the link to the project on GitHub


        Loan pipeline



<td > <td >
Additional information Loan number Client name Processor Lender Company Title The contract price Amount of the loan Closing Date Closure hour Product Rate
<button class = "btn btn-warning" data-toggle = "modal" type = "button" data-target = "# update_modal"> Info
`` & # 39; & # 39;