{"id":7,"date":"2025-05-07T19:08:15","date_gmt":"2025-05-07T19:08:15","guid":{"rendered":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/?page_id=7"},"modified":"2025-05-23T18:51:29","modified_gmt":"2025-05-23T18:51:29","slug":"home","status":"publish","type":"page","link":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/","title":{"rendered":"Multi-Site Post Publisher \u2013 Documentation"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"7\" class=\"elementor elementor-7\">\n\t\t\t\t<div class=\"elementor-element elementor-element-232a990 e-flex e-con-boxed e-con e-parent\" data-id=\"232a990\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-dd58f0a elementor-button-info elementor-align-right elementor-mobile-align-justify elementor-widget elementor-widget-button\" data-id=\"dd58f0a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/wordpress.org\/plugins\/multi-site-post-publisher\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-arrow-alt-circle-down\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM212 140v116h-70.9c-10.7 0-16.1 13-8.5 20.5l114.9 114.3c4.7 4.7 12.2 4.7 16.9 0l114.9-114.3c7.6-7.6 2.2-20.5-8.5-20.5H300V140c0-6.6-5.4-12-12-12h-64c-6.6 0-12 5.4-12 12z\"><\/path><\/svg>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Download MSPP<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\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-6617c61 elementor-widget elementor-widget-html\" data-id=\"6617c61\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2>\ud83d\udcd8 Multi-Site Post Publisher \u2013 Full Documentation<\/h2>\r\n<p><strong>Plugin Domain:<\/strong> <a href=\"https:\/\/wppluginpilot.com\/multisitepostpublisher\">wppluginpilot.com\/multisitepostpublisher<\/a><br>\r\n  <strong>Plugin Type:<\/strong> WordPress Multisite<br>\r\n  <strong>Purpose:<\/strong> Publish posts from the main site to selected subsites in a multisite network<\/p>\r\n\r\n  <h3>\ud83e\udde9 Introduction<\/h3>\r\n  <p>The Multi-Site Post Publisher (MSPP) plugin is a powerful tool for WordPress multisite networks. It enables network administrators to create a post on the main site and push it automatically to one or more subsites, reducing the need to manually copy and paste content into each site. It\u2019s ideal for news networks, franchises, educational organizations, or anyone managing multiple WordPress subsites with similar content requirements.<\/p>\r\n\r\n  <h3>\u2699\ufe0f How It Works (Behind the Scenes)<\/h3>\r\n  <ol>\r\n    <li><strong>Plugin Initialization:<\/strong><br>\r\n      When activated network-wide, it hooks into <code>plugins_loaded<\/code>, initializing the main class and loading:\r\n      <ul>\r\n        <li>Settings page (<code>class-mspp-settings.php<\/code>)<\/li>\r\n        <li>Post metabox (<code>class-mspp-metabox.php<\/code>)<\/li>\r\n        <li>Publishing logic (<code>class-mspp-publisher.php<\/code>)<\/li>\r\n        <li>Utility functions (<code>class-mspp-functions.php<\/code>)<\/li>\r\n      <\/ul>\r\n    <\/li>\r\n    <li><strong>Network Settings Page:<\/strong><br>\r\n      <em>Location:<\/em> Network Admin \u2192 Settings \u2192 MSP Publisher<br>\r\n      Admins can:\r\n      <ul>\r\n        <li>View all available subsites<\/li>\r\n        <li>Select publishable targets<\/li>\r\n        <li>Save preferences using <code>update_site_option()<\/code><\/li>\r\n      <\/ul>\r\n    <\/li>\r\n    <li><strong>Post Edit Screen (Metabox UI):<\/strong><br>\r\n      Main site only. Metabox titled \u201cPublish to Other Sites\u201d shows selected subsites as checkboxes. Selections are saved as post meta.\r\n    <\/li>\r\n    <li><strong>Saving and Publishing Logic:<\/strong><br>\r\n      On <code>save_post<\/code>, if subsites are selected:\r\n      <pre><code>switch_to_blog( $subsite_id );\r\nwp_insert_post( $post_data );\r\nrestore_current_blog();<\/code><\/pre>\r\n      The following are cloned:\r\n      <ul>\r\n        <li>Title, content, excerpt, status<\/li>\r\n        <li>Featured image (if exists)<\/li>\r\n        <li>Post categories (by name)<\/li>\r\n      <\/ul>\r\n      <strong>Note:<\/strong> Custom post types, fields, and ACF are not supported out of the box.\r\n    <\/li>\r\n  <\/ol>\r\n\r\n  <h3>\ud83d\udee0 Installation Guide<\/h3>\r\n  <ol>\r\n    <li>Unzip plugin and upload to <code>\/wp-content\/plugins\/multi-site-post-publisher\/<\/code><\/li>\r\n    <li>Log in to Network Admin Dashboard<\/li>\r\n    <li>Go to Plugins \u2192 Installed Plugins<\/li>\r\n    <li>Click \u201cNetwork Activate\u201d for the plugin<\/li>\r\n  <\/ol>\r\n\r\n  <h3>\ud83e\uddea Configuration<\/h3>\r\n  <ol>\r\n    <li>Navigate to: Network Admin \u2192 Settings \u2192 MSP Publisher<\/li>\r\n    <li>Select the subsites you want to allow publishing to<\/li>\r\n    <li>Click \u201cSave Changes\u201d<\/li>\r\n  <\/ol>\r\n\r\n  <h3>\u270d\ufe0f Usage Guide<\/h3>\r\n  <ol>\r\n    <li>In the main site dashboard, create or edit a post<\/li>\r\n    <li>Scroll to \u201cPublish to Other Sites\u201d metabox<\/li>\r\n    <li>Select the subsites<\/li>\r\n    <li>Click \u201cPublish\u201d or \u201cUpdate\u201d<\/li>\r\n  <\/ol>\r\n  <h3>\ud83e\udded Steps to Generate an Application Password on the Target Site<\/h3>\r\n<ol>\r\n  <li>Log in to the <strong>target site<\/strong> as an <strong>Administrator<\/strong>.<\/li>\r\n  <li>Go to <strong>Users \u2192 Profile<\/strong> (or \"Edit Profile\").<\/li>\r\n  <li>Scroll to the <strong>Application Passwords<\/strong> section.<\/li>\r\n  <li>Enter a name (e.g., <code>MSPP Main Site<\/code>) and click <strong>\u201cAdd New Application Password\u201d<\/strong>.<\/li>\r\n  <li>Copy the generated password immediately \u2013 it will not be shown again.<\/li>\r\n<\/ol>\r\n<p><strong>Note:<\/strong> If the Application Password section is missing, ensure the site uses <strong>HTTPS<\/strong> and the <strong>REST API<\/strong> is enabled.<\/p>\r\n\r\n<h3>\ud83c\udfd7\ufe0f Add External Site in MSPP Plugin<\/h3>\r\n<ol>\r\n  <li>Go to <strong>Network Admin \u2192 Settings \u2192 MSP Publisher<\/strong>.<\/li>\r\n  <li>Scroll to the <strong>\u201cAdd New Site\u201d<\/strong> section.<\/li>\r\n  <li>Fill out the following fields:\r\n    <ul>\r\n      <li><strong>Site URL<\/strong> \u2013 Full site URL (e.g., <code>https:\/\/news.example.com<\/code>)<\/li>\r\n      <li><strong>Username<\/strong> \u2013 The WordPress username associated with the Application Password<\/li>\r\n      <li><strong>Application Password<\/strong> \u2013 The password generated in the previous step<\/li>\r\n    <\/ul>\r\n  <\/li>\r\n  <li>Click <strong>\u201cAdd Site\u201d<\/strong>.<\/li>\r\n<\/ol>\r\n<p>The site will now appear in the list of publishable destinations.<\/p>\r\n\r\n  <h3>\ud83d\udccc Important Notes<\/h3>\r\n  <ul>\r\n    <li><strong>Switch to blog:<\/strong> Uses <code>switch_to_blog()<\/code><\/li>\r\n    <li><strong>Data Sync:<\/strong> One-time push, not live sync<\/li>\r\n    <li><strong>Image Handling:<\/strong> Featured images copied by ID only (may not show if missing)<\/li>\r\n    <li><strong>User Permissions:<\/strong> Only super admins or authorized roles can publish<\/li>\r\n    <li><strong>Custom Post Types:<\/strong> Not supported<\/li>\r\n    <li><strong>Editor Support:<\/strong> Works with Gutenberg & Classic Editor<\/li>\r\n  <\/ul>\r\n\r\n  <h3>\u2753 Troubleshooting<\/h3>\r\n  <table border=\"1\" cellpadding=\"6\" cellspacing=\"0\">\r\n    <thead>\r\n      <tr>\r\n        <th>Issue<\/th>\r\n        <th>Solution<\/th>\r\n      <\/tr>\r\n    <\/thead>\r\n    <tbody>\r\n      <tr>\r\n        <td>Posts not showing in subsites<\/td>\r\n        <td>Ensure subsite is enabled in plugin settings and you have permissions<\/td>\r\n      <\/tr>\r\n      <tr>\r\n        <td>Images missing<\/td>\r\n        <td>Plugin doesn\u2019t upload images to subsites. Upload manually or use CDN<\/td>\r\n      <\/tr>\r\n      <tr>\r\n        <td>Categories not assigned<\/td>\r\n        <td>Categories matched by name. Missing ones are ignored<\/td>\r\n      <\/tr>\r\n      <tr>\r\n        <td>Custom fields not copied<\/td>\r\n        <td>Use <code>mspp_before_publish<\/code> and <code>mspp_after_publish<\/code> hooks<\/td>\r\n      <\/tr>\r\n    <\/tbody>\r\n  <\/table>\r\n\r\n  <h3>\ud83d\udee1 Security & Performance<\/h3>\r\n  <ul>\r\n    <li>Uses nonce verification for metabox form<\/li>\r\n    <li>Only accessible by super admins or authorized users<\/li>\r\n    <li>Uses native WordPress functions \u2014 no raw DB queries<\/li>\r\n  <\/ul>\r\n\r\n  <h3>\ud83e\uddfe Changelog<\/h3>\r\n  <ul>\r\n  <li><strong>v1.0.1 - Updated Code<\/strong>\r\n<ul><li>Added `wp_localize_script` to pass option name (`mspp_sites`) to JavaScript securely.<\/li>\r\n<li>Removed inline script in settings page for better security and maintainability.<\/li>\r\n<li>Minor code cleanup and comments for better readability.<\/li><\/ul>\r\n<\/li>\r\n    <li><strong>v1.0.0 \u2013 Initial Release<\/strong>\r\n      <ul>\r\n        <li>Multisite publishing<\/li>\r\n        <li>Admin settings page<\/li>\r\n        <li>Post edit metabox<\/li>\r\n        <li>Featured image + categories replication<\/li>\r\n      <\/ul>\r\n    <\/li>\r\n  <\/ul>\r\n\r\n  <h3>\ud83e\udde9 Plugin Folder Structure<\/h3>\r\n  <pre><code>multi-site-post-publisher\/\r\n\u251c\u2500\u2500 css\/\r\n\u2502   \u2514\u2500\u2500 admin.css\r\n\u251c\u2500\u2500 js\/\r\n\u2502   \u2514\u2500\u2500 admin.js\r\n\u251c\u2500\u2500 classes\/\r\n\u2502   \u251c\u2500\u2500 class-mspp-settings.php\r\n\u2502   \u251c\u2500\u2500 class-mspp-metabox.php\r\n\u2502   \u251c\u2500\u2500 class-mspp-publisher.php\r\n\u2502   \u2514\u2500\u2500 class-mspp-functions.php\r\n\u251c\u2500\u2500 multi-site-post-publisher.php<\/code><\/pre>\r\n\r\n  <h3>\ud83d\udcde Support<\/h3>\r\n  <p>Visit: <a href=\"https:\/\/wppluginpilot.com\/multisitepostpublisher\">https:\/\/wppluginpilot.com\/multisitepostpublisher<\/a><br>\r\n  Or email: <a href=\"mailto:support@wppluginpilot.com\">support@wppluginpilot.com<\/a><\/p>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2ddc1b2 elementor-widget elementor-widget-wpforms\" data-id=\"2ddc1b2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"wpforms.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style id=\"wpforms-css-vars-elementor-widget-2ddc1b2\">\n\t\t\t\t.elementor-widget-wpforms.elementor-element-2ddc1b2 {\n\t\t\t\t--wpforms-field-border-radius: 10px;\n--wpforms-field-background-color: #FFFFFF;\n--wpforms-field-border-color: #CCCCCC;\n--wpforms-field-border-color-spare: #CCCCCC;\n\t\t\t}\n\t\t\t<\/style><div class=\"wpforms-container wpforms-container-full wpforms-render-modern\" id=\"wpforms-34\"><form id=\"wpforms-form-34\" class=\"wpforms-validate wpforms-form wpforms-ajax-form\" data-formid=\"34\" method=\"post\" enctype=\"multipart\/form-data\" action=\"\/multisitepostpublisher\/wp-json\/wp\/v2\/pages\/7\" data-token=\"ff5c10f12d7bcfc8a37e00fece8f9ae1\" data-token-time=\"1779125885\"><div class=\"wpforms-head-container\"><div class=\"wpforms-title\">Contact Support<\/div><\/div><noscript class=\"wpforms-error-noscript\">Please enable JavaScript in your browser to complete this form.<\/noscript><div id=\"wpforms-error-noscript\" style=\"display: none;\">Please enable JavaScript in your browser to complete this form.<\/div><div class=\"wpforms-field-container\"><div id=\"wpforms-34-field_1-container\" class=\"wpforms-field wpforms-field-name\" data-field-id=\"1\"><label class=\"wpforms-field-label\" for=\"wpforms-34-field_1\">Enter Your Name <span class=\"wpforms-required-label\" aria-hidden=\"true\">*<\/span><\/label><input type=\"text\" id=\"wpforms-34-field_1\" class=\"wpforms-field-medium wpforms-field-required\" name=\"wpforms[fields][1]\" aria-errormessage=\"wpforms-34-field_1-error\" required><\/div><div id=\"wpforms-34-field_2-container\" class=\"wpforms-field wpforms-field-email\" data-field-id=\"2\"><label class=\"wpforms-field-label\" for=\"wpforms-34-field_2\">Enter Your Email <span class=\"wpforms-required-label\" aria-hidden=\"true\">*<\/span><\/label><input type=\"email\" id=\"wpforms-34-field_2\" class=\"wpforms-field-medium wpforms-field-required\" name=\"wpforms[fields][2]\" spellcheck=\"false\" aria-errormessage=\"wpforms-34-field_2-error\" required><\/div>\t\t<div id=\"wpforms-34-field_4-container\"\n\t\t\tclass=\"wpforms-field wpforms-field-text\"\n\t\t\tdata-field-type=\"text\"\n\t\t\tdata-field-id=\"4\"\n\t\t\t>\n\t\t\t<label class=\"wpforms-field-label\" for=\"wpforms-34-field_4\" >know Enter Your<\/label>\n\t\t\t<input type=\"text\" id=\"wpforms-34-field_4\" class=\"wpforms-field-medium\" name=\"wpforms[fields][4]\" >\n\t\t<\/div>\n\t\t<div id=\"wpforms-34-field_3-container\" class=\"wpforms-field wpforms-field-textarea\" data-field-id=\"3\"><label class=\"wpforms-field-label\" for=\"wpforms-34-field_3\">Let us know how we can help...<\/label><textarea id=\"wpforms-34-field_3\" class=\"wpforms-field-medium\" name=\"wpforms[fields][3]\" aria-errormessage=\"wpforms-34-field_3-error\" ><\/textarea><\/div><script>\n\t\t\t\t( function() {\n\t\t\t\t\tconst style = document.createElement( 'style' );\n\t\t\t\t\tstyle.appendChild( document.createTextNode( '#wpforms-34-field_4-container { position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important; } #wpforms-34-field_4-container input { visibility: hidden; } #wpforms-conversational-form-page #wpforms-34-field_4-container label { counter-increment: none; }' ) );\n\t\t\t\t\tdocument.head.appendChild( style );\n\t\t\t\t\tdocument.currentScript?.remove();\n\t\t\t\t} )();\n\t\t\t<\/script><\/div><!-- .wpforms-field-container --><div class=\"wpforms-recaptcha-container wpforms-is-recaptcha wpforms-is-recaptcha-type-v2\" ><div class=\"g-recaptcha\" data-sitekey=\"6Ldy3zErAAAAAGH6xJtExfj1Mk8ox7jYp_Rx8c2W\"><\/div><input type=\"text\" name=\"g-recaptcha-hidden\" class=\"wpforms-recaptcha-hidden\" style=\"position:absolute!important;clip:rect(0,0,0,0)!important;height:1px!important;width:1px!important;border:0!important;overflow:hidden!important;padding:0!important;margin:0!important;\" data-rule-recaptcha=\"1\"><\/div><div class=\"wpforms-submit-container\" ><input type=\"hidden\" name=\"wpforms[id]\" value=\"34\"><input type=\"hidden\" name=\"page_title\" value=\"\"><input type=\"hidden\" name=\"page_url\" value=\"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/pages\/7\"><input type=\"hidden\" name=\"url_referer\" value=\"\"><button type=\"submit\" name=\"wpforms[submit]\" id=\"wpforms-submit-34\" class=\"wpforms-submit\" data-alt-text=\"Sending...\" data-submit-text=\"Submit\" aria-live=\"assertive\" value=\"wpforms-submit\">Submit<\/button><img decoding=\"async\" src=\"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-content\/plugins\/wpforms-lite\/assets\/images\/submit-spin.svg\" class=\"wpforms-submit-spinner\" style=\"display: none;\" width=\"26\" height=\"26\" alt=\"Loading\"><\/div><\/form><\/div>  <!-- .wpforms-container -->\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-316b482 elementor-button-info elementor-align-center elementor-mobile-align-justify elementor-widget elementor-widget-button\" data-id=\"316b482\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/wordpress.org\/plugins\/multi-site-post-publisher\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<svg aria-hidden=\"true\" class=\"e-font-icon-svg e-fas-arrow-alt-circle-down\" viewBox=\"0 0 512 512\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\"><path d=\"M504 256c0 137-111 248-248 248S8 393 8 256 119 8 256 8s248 111 248 248zM212 140v116h-70.9c-10.7 0-16.1 13-8.5 20.5l114.9 114.3c4.7 4.7 12.2 4.7 16.9 0l114.9-114.3c7.6-7.6 2.2-20.5-8.5-20.5H300V140c0-6.6-5.4-12-12-12h-64c-6.6 0-12 5.4-12 12z\"><\/path><\/svg>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Download MSPP<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Download MSPP \ud83d\udcd8 Multi-Site Post Publisher \u2013 Full Documentation Plugin Domain: wppluginpilot.com\/multisitepostpublisher Plugin Type: WordPress Multisite Purpose: Publish posts from the main site to selected subsites in a multisite network \ud83e\udde9 Introduction The Multi-Site Post Publisher (MSPP) plugin is a powerful tool for WordPress multisite networks. It enables network administrators to create a post on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-7","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/pages\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":41,"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/pages\/7\/revisions"}],"predecessor-version":[{"id":76,"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/pages\/7\/revisions\/76"}],"wp:attachment":[{"href":"https:\/\/wppluginpilot.com\/multisitepostpublisher\/wp-json\/wp\/v2\/media?parent=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}