<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gothedistance</author_name>
  <author_url>https://blog.hatena.ne.jp/gothedistance/</author_url>
  <blog_title>Life is Really Short, Have Your Life!!</blog_title>
  <blog_url>https://aroundthedistance.hatenadiary.jp/</blog_url>
  <categories>
    <anon>WordPress</anon>
  </categories>
  <description>post_typeを追加したいという要件だった。これで瞬殺。 &lt;?php function custom_search_query($query) { if (!is_admin() &amp;&amp; $query-&gt;is_search) { $query-&gt;set('s', $query-&gt;get('s')); $query-&gt;set('post_type', [&quot;post&quot;, &quot;page&quot;, &quot;YOUR_POST_TYPE&quot;]); } } add_filter('pre_get_posts', 'custom_search_query'); WP_Queryで指定できるものは何でも指定できるようなので…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Faroundthedistance.hatenadiary.jp%2Fentry%2F2023%2F07%2F20%2F231534&quot; title=&quot;WordPressの検索機能のカスタマイズ - Life is Really Short, Have Your Life!!&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-07-20 23:15:34</published>
  <title>WordPressの検索機能のカスタマイズ</title>
  <type>rich</type>
  <url>https://aroundthedistance.hatenadiary.jp/entry/2023/07/20/231534</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
