{"id":233655,"date":"2023-02-19T15:19:00","date_gmt":"2023-02-19T12:19:00","guid":{"rendered":"https:\/\/wordpress.mediadoma.com\/?p=233655"},"modified":"2022-11-11T03:16:53","modified_gmt":"2022-11-11T00:16:53","slug":"posibnik-zminit-globalnij-zapit-wordpress","status":"publish","type":"post","link":"https:\/\/wordpress.mediadoma.com\/uk\/posibnik-zminit-globalnij-zapit-wordpress\/","title":{"rendered":"\u041f\u043e\u0441\u0456\u0431\u043d\u0438\u043a: \u0437\u043c\u0456\u043d\u0456\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442 WordPress"},"content":{"rendered":"\n<p>\u0423 \u0434\u0435\u044f\u043a\u0438\u0445 \u0432\u0438\u043f\u0430\u0434\u043a\u0430\u0445 \u0432\u0430\u043c \u043c\u043e\u0436\u0435 \u0437\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0438\u0441\u044f \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442 \u043d\u0430 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u044e, \u044f\u043a\u0438\u0439 WordPress \u0432\u0438\u043a\u043e\u043d\u0443\u0454 \u043d\u0430 \u0431\u0443\u0434\u044c-\u044f\u043a\u0456\u0439 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456, \u044f\u043a\u0443 \u0432\u0438 \u0432\u0456\u0434\u0432\u0456\u0434\u0443\u0454\u0442\u0435 \u2013 \u044f\u043a \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u0456 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443. \u0423 \u0446\u044c\u043e\u043c\u0443 \u043f\u043e\u0441\u0456\u0431\u043d\u0438\u043a\u0443 \u043c\u0438 \u0440\u043e\u0437\u0433\u043b\u044f\u043d\u0435\u043c\u043e, \u044f\u043a\u0438\u0439 \u0445\u0443\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u044f\u043a \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438 \u0437\u0430\u043f\u0438\u0442\u0443 \u043d\u0430 \u0441\u0432\u0456\u0439 \u0441\u043c\u0430\u043a.<\/p>\n<h2>\u042f\u043a\u0438\u0439 \u0433\u0430\u0447\u043e\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438<\/h2>\n<p>\u0421\u043f\u043e\u0447\u0430\u0442\u043a\u0443 \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u043d\u0430\u0442\u0438, \u0434\u043e \u044f\u043a\u043e\u0433\u043e \u0445\u0443\u043a\u0430 \u0434\u043e\u0434\u0430\u0442\u0438 \u0441\u0432\u0456\u0439 \u043a\u043e\u0434. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u0435\u043d \u0445\u0443\u043a, \u044f\u043a\u0438\u0439 \u0442\u0440\u0430\u043f\u0438\u0442\u044c\u0441\u044f \u0432\u0456\u0434\u0440\u0430\u0437\u0443 \u043f\u0456\u0441\u043b\u044f \u0442\u043e\u0433\u043e, \u044f\u043a WordPress \u043d\u0430\u043b\u0430\u0448\u0442\u0443\u0454 \u0432\u0441\u0456 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438, \u0430\u043b\u0435 \u0434\u043e \u0432\u0438\u043a\u043e\u043d\u0430\u043d\u043d\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0442\u0443. \u0414\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043c\u0438 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0454\u043c\u043e \u0434\u0456\u044e <code>pre_get_posts<\/code>.<\/p>\n<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u0445\u0443\u043a\u0443 \u0432\u0438 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u0442\u0435 \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440; \u0446\u0435 <code>WP_Query<\/code>\u043e\u0431&#8217;\u0454\u043a\u0442, \u0437 \u044f\u043a\u0438\u043c WordPress \u043f\u0456\u0437\u043d\u0456\u0448\u0435 \u0432\u0438\u043a\u043e\u043d\u0430\u0454 \u0437\u0430\u043f\u0438\u0442. \u0412\u0438 \u0432\u043d\u043e\u0441\u0438\u0442\u0435 \u0437\u043c\u0456\u043d\u0438 \u0432 \u043e\u0431\u2019\u0454\u043a\u0442, \u0430\u043b\u0435 \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u0442\u0438 \u0439\u043e\u0433\u043e, \u043e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 WordPress \u0432\u0438\u043a\u043e\u043d\u0430\u0454 \u0437\u0430\u043f\u0438\u0442 \u0456\u0437 \u0437\u043c\u0456\u043d\u0435\u043d\u0438\u043c \u043e\u0431\u2019\u0454\u043a\u0442\u043e\u043c.<\/p>\n<pre><code>add_action('pre_get_posts', function($query) {\n    \/\/ Add your code here\n});<\/code><\/pre>\n<p>\u0417\u043c\u0456\u043d\u0430 \u0437\u0430\u043f\u0438\u0442\u0443, \u0448\u0432\u0438\u0434\u0448\u0435 \u0437\u0430 \u0432\u0441\u0435, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0454 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u0430\u043d\u043d\u044f \u0434\u0435\u044f\u043a\u0438\u0445 \u0443\u043c\u043e\u0432\u043d\u0438\u0445 \u0442\u0435\u0433\u0456\u0432, \u0449\u043e\u0431 \u0432\u0438\u0437\u043d\u0430\u0447\u0438\u0442\u0438 \u0442\u0456 \u0432\u0438\u043f\u0430\u0434\u043a\u0438, \u044f\u043a\u0456 \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u0437\u043c\u0456\u043d\u0438\u0442\u0438. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u0432\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0446\u0456\u043b\u0438\u0442\u0438 \u0437\u0430\u043f\u0438\u0442 \u043b\u0438\u0448\u0435 \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438 \u043f\u043e\u0448\u0443\u043a\u0443 \u0430\u0431\u043e \u043f\u0435\u0440\u0435\u0433\u043b\u044f\u0434\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0439.<\/p>\n<h2>\u0423\u043c\u043e\u0432\u043d\u0456 \u0442\u0435\u0433\u0438<\/h2>\n<p>\u0423 WordPress \u0454 \u043a\u0443\u043f\u0430 <a href=\"https:\/\/codex.wordpress.org\/Conditional_Tags\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0443\u043c\u043e\u0432\u043d\u0438\u0445 \u0442\u0435\u0433\u0456\u0432<\/a>, \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u044f\u043a\u0438\u0445 \u043c\u043e\u0436\u043d\u0430 \u0432\u043a\u0430\u0437\u0430\u0442\u0438, \u0443 \u044f\u043a\u0438\u0445 \u0432\u0438\u043f\u0430\u0434\u043a\u0430\u0445 \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0434\u043e\u0434\u0430\u0442\u0438 \u0441\u0432\u0456\u0439 \u043a\u043e\u0434. \u0423\u043c\u043e\u0432\u043d\u0438\u0439 \u0442\u0435\u0433 \u2014 \u0446\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0456\u044f, \u044f\u043a\u0430 \u043f\u043e\u0432\u0435\u0440\u0442\u0430\u0454 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f true \u0430\u0431\u043e false \u0437\u0430\u043b\u0435\u0436\u043d\u043e \u0432\u0456\u0434 \u0442\u043e\u0433\u043e, \u0432 \u044f\u043a\u043e\u043c\u0443 \u0441\u0442\u0430\u043d\u0456 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f WordPress. \u041f\u0440\u0438\u043a\u043b\u0430\u0434\u0438 \u0437\u0432\u0438\u0447\u0430\u0439\u043d\u0438\u0445 \u0443\u043c\u043e\u0432\u043d\u0438\u0445 \u0442\u0435\u0433\u0456\u0432 \u043f\u0440\u0438\u0437\u043d\u0430\u0447\u0435\u043d\u0456 <code>is_admin()<\/code>\u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438 \u0442\u043e\u0433\u043e, \u0447\u0438 \u043c\u0438 \u0437\u0430\u0440\u0430\u0437 \u043f\u0435\u0440\u0435\u0431\u0443\u0432\u0430\u0454\u043c\u043e \u0432 \u0430\u0434\u043c\u0456\u043d\u0446\u0456 \u0447\u0438 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456, <code>is_singular()<\/code>\u0447\u0438 \u0437\u043d\u0430\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u044f \u043c\u0438 \u043d\u0430 \u043e\u0434\u043d\u0456\u0439 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u0447\u0438 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u0443 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456 \u0442\u0430 <code>is_search()<\/code>\u044f\u043a\u0449\u043e \u043c\u0438 \u043d\u0430 \u0441\u0442\u043e\u0440\u0456\u043d\u0446\u0456 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0456\u0432 \u043f\u043e\u0448\u0443\u043a\u0443.<\/p>\n<p>\u041c\u0430\u0439\u0442\u0435 \u043d\u0430 \u0443\u0432\u0430\u0437\u0456, \u0449\u043e \u0445\u0443\u043a <code>pre_get_posts<\/code>\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u044f\u043a \u0434\u043b\u044f \u0430\u0434\u043c\u0456\u043d\u0456\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430, \u0442\u0430\u043a \u0456 \u0434\u043b\u044f \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443. \u042f\u043a\u0449\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u043f\u043b\u0438\u043d\u0443\u0442\u0438 \u043b\u0438\u0448\u0435 \u043d\u0430 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442 \u0443 \u0456\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0456, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0437\u0430\u0433\u043e\u0440\u043d\u0443\u0442\u0438 \u0441\u0432\u0456\u0439 \u043a\u043e\u0434 \u0443 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0443 if \u0443\u043c\u043e\u0432\u043d\u043e\u0433\u043e \u0442\u0435\u0433\u0443 <code>is_admin()<\/code>.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0456\u0442\u043a\u0430 \u043f\u0440\u043e \u0443\u043c\u043e\u0432\u043d\u0456 \u0442\u0435\u0433\u0438 \u0432<code>pre_get_posts<\/code><\/h3>\n<p>\u0423\u043c\u043e\u0432\u043d\u0456 \u0442\u0435\u0433\u0438 \u2014 \u0446\u0435 \u0447\u0443\u0434\u043e\u0432\u043e, \u0430\u043b\u0435 \u0454 \u0434\u0435\u044f\u043a\u0456 \u0440\u0435\u0447\u0456, \u043f\u0440\u043e \u044f\u043a\u0456 \u0441\u043b\u0456\u0434 \u043f\u0430\u043c\u2019\u044f\u0442\u0430\u0442\u0438, \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u044e\u0447\u0438 \u0457\u0445 \u0443\u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0456 <code>pre_get_posts<\/code>.<\/p>\n<p>\u041f\u043e-\u043f\u0435\u0440\u0448\u0435, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043e\u0437\u043d\u0430\u0439\u043e\u043c\u0438\u0442\u0438\u0441\u044f \u0437 \u0442\u0435\u0433\u043e\u043c <code>is_main_query()<\/code>. \u0414\u0456\u044f <code>pre_get_posts<\/code>\u0444\u0430\u043a\u0442\u0438\u0447\u043d\u043e \u0432\u0438\u043a\u043e\u043d\u0443\u0454\u0442\u044c\u0441\u044f \u043a\u0456\u043b\u044c\u043a\u0430 \u0440\u0430\u0437\u0456\u0432 \u0434\u043b\u044f \u043a\u043e\u0436\u043d\u043e\u0433\u043e \u0437\u0430\u0432\u0430\u043d\u0442\u0430\u0436\u0435\u043d\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0438. \u041d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434 <code>pre_get_posts<\/code>, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u0442\u044c\u0441\u044f \u043f\u0456\u0434 \u0447\u0430\u0441 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0456\u0457 \u043a\u043e\u0436\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e (\u0432\u043a\u043b\u044e\u0447\u043d\u043e \u0437 \u0442\u0438\u043c\u0438 \u0443 \u0432\u0456\u0434\u0436\u0435\u0442\u0430\u0445). \u0429\u043e\u0431 \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0444\u0430\u043a\u0442\u0438\u0447\u043d\u0438\u0439 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434, \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u0434\u043b\u044f \u0430\u0440\u0445\u0456\u0432\u0443 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0456\u0439 \u0430\u0431\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0438 \u043f\u043e\u0448\u0443\u043a\u0443, \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043d\u0430\u0446\u0456\u043b\u0438\u0442\u0438 \u00ab\u043e\u0441\u043d\u043e\u0432\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442\u00bb \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e <code>is_main_query()<\/code>.<\/p>\n<p>Secondly, you need to be aware of cases where you need to check the conditional tags onto the provided object instead of calling the function &#8220;independently&quot;. Usually when you use conditional tags, you would write it like this:<\/p>\n<pre><code>if (is_main_query()) {\n    \/\/ Do stuff\n}<\/code><\/pre>\n<p>However when using <code>pre_get_posts<\/code>, there are some conditional tags you need to apply onto the object. For example:<\/p>\n<pre><code>add_action('pre_get_posts', function($query) {\n    if ($query-&gt;is_main_query()) {\n        \/\/ Add your code here\n    }\n});<\/code><\/pre>\n<p>You should always check <code>is_main_query()<\/code> onto the object provided in <code>pre_get_posts<\/code>. Read the <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/pre_get_posts\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">documentation for pre_get_posts<\/a> for more information.<\/p>\n<p>This is an example of checking if we are not in admin, and if we are at the main post query:<\/p>\n<pre><code>add_action('pre_get_posts', function($query) {\n    if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {\n        \/\/ Add your code here\n    }\n});<\/code><\/pre>\n<h2>Changing or adding arguments<\/h2>\n<p>Since we are working with a <code>WP_Query<\/code> object, you can refer to <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">WP_Query\u2019s documentation<\/a> for how to build your arguments to customize the posts query. Keep in mind that arguments are already populated. In that case you need to append or change existing values. Or remove the ones you want to remove.<\/p>\n<p>You use the <code>set()<\/code> function onto the <code>WP_Query<\/code> object to set arguments. The method accepts two arguments, the argument key and secondly the value. For example, setting the <code>posts_per_page<\/code> argument would be done like this:<\/p>\n<pre><code>add_action('pre_get_posts', function($query) {\n    if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {\n        $query-&gt;set('posts_per_page', 20);\n    }\n});<\/code><\/pre>\n<p>In cases where you want to append or change a pre-existing argument, you would usually do this by first saving the existing argument in a variable. You can use the method <code>get()<\/code> for this. Then you modify the variable, by appending or merging arrays or whatnot. And finally you use <code>set()<\/code> to replace the modified variable back onto the query object. I recommend using <code>var_dump()<\/code> on the object to see what it contains, and this is also a nice way to check if your conditional tags are correct.<\/p>\n<p>Here is a quick example of using <code>get()<\/code> (simply checking if it is empty), and if so, add your own arguments with <code>set()<\/code>.<\/p>\n<pre><code>add_action('pre_get_posts', function($query) {\n    if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {\n        if (!$query-&gt;get('meta_query')) {\n            $query-&gt;set('meta_query', [\/ your arguments here \/]);\n        }\n    }\n});<\/code><\/pre>\n<h3>Note about tax_query<\/h3>\n<p>WordPress \u043c\u0430\u0454 \u043e\u043a\u0440\u0435\u043c\u0456 \u043f\u0456\u0434\u043a\u043b\u0430\u0441\u0438 \u0434\u043b\u044f \u0440\u043e\u0431\u043e\u0442\u0438 \u0437 \u0447\u0430\u0441\u0442\u0438\u043d\u043e\u044e \u0442\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0456\u0457 (<code>WP_Tax_Query<\/code>) \u0443 <code>WP_Query<\/code>. \u042f\u043a\u0449\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u043a\u043b\u0430\u0434\u043d\u0456\u0448\u0456 \u043c\u043e\u0434\u0438\u0444\u0456\u043a\u0430\u0446\u0456\u0457 \u0442\u0430\u043a\u0441\u043e\u043d\u043e\u043c\u0456\u0447\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0442\u0443, \u0446\u0435 <code>pre_get_posts<\/code>\u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0437\u0430\u0440\u0430\u043d\u043e. \u0414\u0435\u044f\u043a\u0456 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u043c\u043e\u0436\u0443\u0442\u044c \u0431\u0443\u0442\u0438 \u043f\u043e\u0440\u043e\u0436\u043d\u0456\u043c\u0438, \u043e\u0441\u043a\u0456\u043b\u044c\u043a\u0438 \u0432\u043e\u043d\u0438 \u0437\u0430\u043f\u043e\u0432\u043d\u044e\u044e\u0442\u044c\u0441\u044f \u043f\u0456\u0437\u043d\u0456\u0448\u0435. \u0423 \u0446\u044c\u043e\u043c\u0443 \u0432\u0438\u043f\u0430\u0434\u043a\u0443 \u0432\u0430\u043c \u043a\u0440\u0430\u0449\u0435 \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0434\u0456\u044e <code>parse_tax_query<\/code>\u0437\u0430\u043c\u0456\u0441\u0442\u044c <code>pre_get_posts<\/code>. \u041f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/developer.wordpress.org\/reference\/hooks\/parse_tax_query\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0456\u044e \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0445\u0443\u043a\u0430<\/a>, \u0449\u043e\u0431 \u0434\u0456\u0437\u043d\u0430\u0442\u0438\u0441\u044f, \u0447\u0438 \u043f\u0456\u0434\u0445\u043e\u0434\u0438\u0442\u044c \u0432\u0456\u043d \u0432\u0430\u043c.<\/p>\n<h2>\u0412\u0438\u0441\u043d\u043e\u0432\u043e\u043a<\/h2>\n<p>\u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438, \u044f\u043a\u0456 \u0432\u0438 \u0434\u043e\u0434\u0430\u0454\u0442\u0435 \u0430\u0431\u043e \u0437\u043c\u0456\u043d\u044e\u0454\u0442\u0435, \u043f\u043e\u0432\u043d\u0456\u0441\u0442\u044e \u0437\u0430\u043b\u0435\u0436\u0430\u0442\u044c \u0432\u0456\u0434 \u0442\u043e\u0433\u043e, \u0449\u043e \u0432\u0438 \u0445\u043e\u0447\u0435\u0442\u0435 \u0437\u0440\u043e\u0431\u0438\u0442\u0438, \u0430\u043b\u0435 \u0442\u0435\u043f\u0435\u0440 \u0432\u0438 \u043f\u043e\u0432\u0438\u043d\u043d\u0456 \u043c\u0430\u0442\u0438 \u043f\u0435\u0432\u043d\u0435 \u0443\u044f\u0432\u043b\u0435\u043d\u043d\u044f \u043f\u0440\u043e \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0456\u0457, \u0449\u043e\u0431 \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0434\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0438\u0442\u0443. \u042f\u043a\u0449\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u0442\u0440\u043e\u0445\u0438 \u0437\u0440\u043e\u0437\u0443\u043c\u0456\u0442\u0438 <code>WP_Query<\/code>\u043e\u0431\u2019\u0454\u043a\u0442 \u0456 \u044f\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0439\u043e\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438, \u043c\u043e\u0454 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f \u043f\u0440\u043e <a href=\"http:\/\/awhitepixel.com\/blog\/how-to-query-posts-in-wordpress\/\" target=\"_blank\" rel=\"noopener nofollow\" class=\"external external_icon\">\u0442\u0435, \u044f\u043a \u0437\u0430\u043f\u0438\u0442\u0443\u0432\u0430\u0442\u0438 \u043f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f<\/a>, \u043c\u043e\u0436\u0435 \u0431\u0443\u0442\u0438 \u0446\u0456\u043a\u0430\u0432\u0438\u043c.<\/p>\n<p><div id=\"PostUnique_PostSource\" style=\"padding-top: 50px\">\u0414\u0436\u0435\u0440\u0435\u043b\u043e \u0437\u0430\u043f\u0438\u0441\u0443:  <a target=\"_blank\" rel=\"noopener nofollow\" href=\"\/\/awhitepixel.com\" class=\"external external_icon\">awhitepixel.com<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423 \u0446\u0456\u0439 \u043f\u0443\u0431\u043b\u0456\u043a\u0430\u0446\u0456\u0457 \u043c\u0438 \u0434\u0456\u0437\u043d\u0430\u0454\u043c\u043e\u0441\u044f, \u044f\u043a \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0438\u0439 \u0437\u0430\u043f\u0438\u0442 WordPress, \u044f\u043a\u0438\u0439 \u0445\u0443\u043a \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0442\u0430 \u044f\u043a \u0437\u043c\u0456\u043d\u0438\u0442\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438 \u043d\u0430 \u0441\u0432\u0456\u0439 \u0441\u043c\u0430\u043a.<\/p>\n","protected":false},"author":1,"featured_media":152576,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_wp_rev_ctl_limit":""},"categories":[902,923,1110,839,849,869,869,839,902,849,923],"tags":[1174],"class_list":["post-233655","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kod-3","category-inshyj","category-n-a","category-kerivnytstvo-dlia-pochatkivtsiv","category-pidruchnyky","category-wordpress-10","tag-affiai-uk"],"_links":{"self":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/comments?post=233655"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/posts\/233655\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media\/152576"}],"wp:attachment":[{"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/media?parent=233655"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/categories?post=233655"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.mediadoma.com\/uk\/wp-json\/wp\/v2\/tags?post=233655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}