{"id":14194,"date":"2023-12-25T22:26:33","date_gmt":"2023-12-25T19:26:33","guid":{"rendered":"https:\/\/elzero.org\/?p=14194"},"modified":"2023-12-25T22:26:33","modified_gmt":"2023-12-25T19:26:33","slug":"wordpress-add-short-code-to-count-members","status":"publish","type":"post","link":"https:\/\/elzero.org\/old\/wordpress-add-short-code-to-count-members\/","title":{"rendered":"\u0625\u0636\u0627\u0641\u0629 Short Code \u0644\u062d\u0633\u0627\u0628 \u0639\u062f\u062f \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646"},"content":{"rendered":"<div class=\"text\">\r\n\u0642\u0645\u0646\u0627 \u0628\u0634\u0631\u062d \u0643\u064a\u0641\u064a\u0629 \u062d\u0633\u0627\u0628 \u0639\u062f\u062f \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646 \u0645\u0628\u0627\u0634\u0631\u0629 \u0641\u064a \u0647\u0630\u0627 \u0627\u0644\u062f\u0631\u0633 <a href=\"https:\/\/elzero.org\/old\/wordpress-count-registered-members\/\" rel=\"noopener\" target=\"_blank\">\u0647\u0646\u0627<\/a> \u0648\u0627\u0644\u0622\u0646 \u0633\u0646\u0642\u0648\u0645 \u0628\u0634\u0631\u062d \u0643\u064a\u0641\u064a\u0629 \u0639\u0645\u0644 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0648\u0625\u0636\u0627\u0641\u062a\u0647 \u0643 Short Code \u0643\u0644 \u0645\u0627 \u0639\u0644\u064a\u0643 \u0647\u0648 \u0625\u0636\u0627\u0641\u0629 \u0647\u0630\u0647 \u0627\u0644 Function \u0644\u0645\u0644\u0641 functions.php \u0641\u064a \u0645\u062c\u0644\u062f \u0627\u0644\u062a\u0635\u0645\u064a\u0645 \u0627\u0644\u062e\u0627\u0635 \u0628\u0643\r\n<\/div>\r\n\r\n<script type=\"text\/plain\" class=\"language-php\">\r\nfunction wp_count_members() {\r\n  $usercount = count_users();\r\n  $result = $usercount['total_users'];\r\n  return $result;\r\n}\r\nadd_shortcode('count_members', 'wp_count_members');\r\n<\/script>\r\n\r\n<div class=\"text\">\r\n\u0627\u0644\u0622\u0646 \u064a\u0645\u0643\u0646\u0643 \u0625\u0633\u062a\u062e\u062f\u0627\u0645 \u0627\u0644 Short Code \u0641\u064a \u0623\u064a \u0645\u0643\u0627\u0646 \u0641\u064a \u0645\u0644\u0641\u0627\u062a \u0627\u0644\u062a\u0635\u0645\u064a\u0645 \u0639\u0646 \u0637\u0631\u064a\u0642 \u0627\u0644 Code \u0627\u0644\u062a\u0627\u0644\u064a\r\n<\/div>\r\n\r\n<script type=\"text\/plain\" class=\"language-php\">\r\necho do_shortcode('[count_members]');\r\n<\/script>\r\n","protected":false},"excerpt":{"rendered":"<p>\u062d\u0633\u0627\u0628 \u0639\u062f\u062f \u0627\u0644\u0645\u0633\u062a\u062e\u062f\u0645\u064a\u0646 \u0628\u0648\u0627\u0633\u0637\u0629 Short Code<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[526],"tags":[],"class_list":["post-14194","post","type-post","status-publish","format-standard","hentry","category-wordpress-tutorials"],"_links":{"self":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/comments?post=14194"}],"version-history":[{"count":1,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14194\/revisions"}],"predecessor-version":[{"id":14195,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/posts\/14194\/revisions\/14195"}],"wp:attachment":[{"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/media?parent=14194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/categories?post=14194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/elzero.org\/old\/wp-json\/wp\/v2\/tags?post=14194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}