{"id":19190,"date":"2021-07-31T19:00:01","date_gmt":"2021-07-31T14:30:01","guid":{"rendered":"https:\/\/www.themento.net\/fa\/?p=19190"},"modified":"2021-07-31T14:13:17","modified_gmt":"2021-07-31T09:43:17","slug":"show-site-only-for-wordpress-member-users","status":"publish","type":"post","link":"https:\/\/www.themento.net\/fa\/19190\/show-site-only-for-wordpress-member-users\/","title":{"rendered":"\u0646\u0645\u0627\u06cc\u0634 \u0633\u0627\u06cc\u062a \u0641\u0642\u0637 \u0628\u0631\u0627\u06cc \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0639\u0636\u0648 \u062f\u0631 \u0648\u0631\u062f\u067e\u0631\u0633"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"19190\" class=\"elementor elementor-19190\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f3f6807 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f3f6807\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-68a4e4b\" data-id=\"68a4e4b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b6e1e86 elementor-widget elementor-widget-text-editor\" data-id=\"b6e1e86\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u06cc\u062e\u0648\u0627\u06cc\u0645 \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u0633\u0627\u06cc\u062a \u0648\u0631\u062f\u067e\u0631\u0633\u06cc\u0645\u0648\u0646 \u0631\u0648 \u0641\u0642\u0637 \u0628\u0647 \u0627\u0639\u0636\u0627\u06cc \u0633\u0627\u06cc\u062a \u0646\u0645\u0627\u06cc\u0634 \u0628\u062f\u06cc\u0645 \u0648 \u0628\u0627\u0632\u062f\u06cc\u062f \u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0639\u0627\u062f\u06cc \u0633\u0627\u06cc\u062a \u0645\u0627 \u0631\u0648 \u0645\u0634\u0627\u0647\u062f\u0647 \u0646\u06a9\u0646\u0646\u062f.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f478710 elementor-widget elementor-widget-text-editor\" data-id=\"f478710\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u062a\u0648\u06cc \u0645\u0642\u0627\u0644\u0647 &#8220;<a href=\"https:\/\/www.themento.net\/fa\/14165\/restrict-a-portion-of-the-article-or-tab-to-members\/\">\u0622\u0645\u0648\u0632\u0634 \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u062f\u0646 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0645\u0642\u0627\u0644\u0647 \u06cc\u0627 \u0628\u0631\u06af\u0647 \u0628\u0631\u0627\u06cc \u0627\u0639\u0636\u0627\u0621<\/a>&#8221; \u0645\u0627 \u06cc\u0627\u062f\u06af\u0631\u0641\u062a\u06cc\u0645 \u06a9\u0647 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0645\u062d\u062a\u0648\u0627\u06cc \u0633\u0627\u06cc\u062a \u0631\u0648 \u0628\u0631\u0627\u06cc \u0627\u0639\u0636\u0627\u0621 \u0646\u0645\u0627\u06cc\u0634 \u0628\u062f\u06cc\u0645 \u0648 \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u06a9\u0644 \u0633\u0627\u06cc\u062a \u0631\u0627 \u0641\u0642\u0637 \u0628\u0647 \u0627\u0639\u0636\u0627\u0621 \u0646\u0645\u0627\u06cc\u0634 \u062f\u0647\u06cc\u062f.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-77fa913 elementor-widget elementor-widget-text-editor\" data-id=\"77fa913\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\u0637\u0628\u0642 \u0622\u0645\u0648\u0632\u0634 &#8220;<a href=\"https:\/\/www.themento.net\/fa\/18784\/insert-and-inject-php-code-in-wordpress\/\">\u0642\u0631\u0627\u0631 \u062f\u0627\u062f\u0646 \u0648 \u062a\u0632\u0631\u06cc\u0642 \u06a9\u062f php \u062f\u0631 \u0648\u0631\u062f\u067e\u0631\u0633 \u0628\u062f\u0648\u0646 \u062f\u0633\u062a\u06a9\u0627\u0631\u06cc \u0642\u0627\u0644\u0628<\/a>&#8221; \u0634\u0645\u0627 \u0645\u06cc\u062a\u0648\u0627\u0646\u06cc\u062f \u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u0628\u062f\u0648\u0646 \u062f\u0633\u062a\u06a9\u0627\u0631\u06cc \u0642\u0627\u0644\u0628 \u062f\u0631 \u0648\u0631\u062f\u067e\u0631\u0633 \u0627\u062c\u0631\u0627 \u06a9\u0646\u06cc\u062f \u0648 \u062f\u0631 \u06a9\u062f \u0632\u06cc\u0631 \u06cc\u06a9 \u0641\u0627\u0646\u06a9\u0634 \u0627\u062c\u0631\u0627 \u0645\u06cc\u0634\u0647 \u06a9\u0647 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0627\u0631\u0628\u0631 \u062f\u0631 \u0633\u0627\u06cc\u062a \u0644\u0627\u06af\u06cc\u0646 \u0646\u0628\u0627\u0634\u0647 \u0628\u0647 \u0635\u0641\u062d\u0647 \u0648\u0631\u0648\u062f \u0631\u06cc\u062f\u0627\u06cc\u0631\u06a9\u062a \u062e\u0648\u0627\u0647\u062f \u0634\u062f \u0648 \u0632\u0645\u0627\u0646\u06cc \u06a9\u0647 \u06a9\u0627\u0631\u0628\u0631 \u0648\u0627\u0631\u062f \u0633\u0627\u06cc\u062a \u0645\u06cc \u0634\u0648\u062f \u0645\u06cc\u062a\u0648\u0627\u0646\u062f \u0633\u0627\u06cc\u062a \u0631\u0627 \u0645\u0634\u0627\u0647\u062f\u0647 \u0646\u0645\u0627\u06cc\u062f.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c19b098 elementor-widget elementor-widget-bdt-source-code\" data-id=\"c19b098\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"bdt-source-code.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\n\n        <div class=\"bdt-source-code prism-okaidia\">\n\n\t\t\t                <button class=\"bdt-copy-button\">Copy<\/button>\n\t\t\t<pre class=\"language-php\"><code>\/\/ Redirect to login page in wordpress\n\nadd_action( &#039;init&#039;, &#039;tmt_wp_user_logged_in&#039; );\n \nfunction tmt_wp_user_logged_in() {\n     if (!is_user_logged_in()) {\n          wp_redirect( wp_login_url() ); exit;\n     }\n}<\/code><\/pre><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u0645\u06cc\u062e\u0648\u0627\u06cc\u0645 \u06cc\u0627\u062f \u0628\u06af\u06cc\u0631\u06cc\u0645 \u06a9\u0647 \u0633\u0627\u06cc\u062a \u0648\u0631\u062f\u067e\u0631\u0633\u06cc\u0645\u0648\u0646 \u0631\u0648 \u0641\u0642\u0637 \u0628\u0647 \u0627\u0639\u0636\u0627\u06cc \u0633\u0627\u06cc\u062a \u0646\u0645\u0627\u06cc\u0634 \u0628\u062f\u06cc\u0645 \u0648 \u0628\u0627\u0632\u062f\u06cc\u062f \u06a9\u0646\u0646\u062f\u06af\u0627\u0646 \u0639\u0627\u062f\u06cc \u0633\u0627\u06cc\u062a \u0645\u0627 \u0631\u0648 \u0645\u0634\u0627\u0647\u062f\u0647 \u0646\u06a9\u0646\u0646\u062f. \u062a\u0648\u06cc \u0645\u0642\u0627\u0644\u0647 &#8220;\u0622\u0645\u0648\u0632\u0634 \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u062f\u0646 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0645\u0642\u0627\u0644\u0647 \u06cc\u0627 \u0628\u0631\u06af\u0647 \u0628\u0631\u0627\u06cc \u0627\u0639\u0636\u0627\u0621&#8221; \u0645\u0627 \u06cc\u0627\u062f\u06af\u0631\u0641\u062a\u06cc\u0645 \u06a9\u0647 \u0628\u062e\u0634\u06cc \u0627\u0632 \u0645\u062d\u062a\u0648\u0627\u06cc \u0633\u0627\u06cc\u062a \u0631\u0648 \u0628\u0631\u0627\u06cc \u0627\u0639\u0636\u0627\u0621 \u0646\u0645\u0627\u06cc\u0634 \u0628\u062f\u06cc\u0645 \u0648 \u062f\u0631 \u0627\u06cc\u0646 \u0622\u0645\u0648\u0632\u0634 \u06a9\u0644 \u0633\u0627\u06cc\u062a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":19309,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[57,59],"tags":[],"class_list":["post-19190","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress-tutorials","category-wordpress-codes"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/posts\/19190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/comments?post=19190"}],"version-history":[{"count":0,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/posts\/19190\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/media\/19309"}],"wp:attachment":[{"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/media?parent=19190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/categories?post=19190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.themento.net\/fa\/wp-json\/wp\/v2\/tags?post=19190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}