Hello Bloggers, आज इस Post में मैं आपको WordPress Post में Social Share Button कैसे लगाते है के बारे में बताऊँगा, अगर आपके Blog में जो भी Post आप लिखते है उसमे Post के ऊपर ( Header ) और नीचे ( Footer ) में Social Share Button नही दिखते है तो आप समझ लो कि आप बहुत बड़ी गलती कर रहे है और आप जितना जल्दी इस गलती से बाहर हो जाए उतना ही अच्छा है।
क्योकि अगर आपके Blog Post में Social Share Button नही तो अब आप समझे की आपका कितना नुकशान हो रहा है जब भी कोई User आपके Blog में आता है और उसे आपकी Post से Help मिलती है और वो आपकी उस Post को अपने Friends के साथ Share करना चाहता है या फिर उसे अपनी Profile में Share करना चाहता है तो वो नही कर सकता है।
अगर User आपकी Post को Share करता है तो आपको उसकी Profile से भी Traffic मिलता है पर अगर आपके Blog Post में Social Share Button नही है तो वो आपकी Post को Share नही कर सकता है तो अब आप समझ सकते है कि आपका कितना ज्यादा नुकसान हो रहा है तो अगर आप इतना सब जानने के बाद अपनी ये Mistake को Improve करना चाहते है तो आप को इस Post उसे Improve करने की पुरी Guide मिल जाएगी।
वैसे तो आपको WordPress Directory में कई सारे Plugin मिल जायेंगे जिनका Use करके आप अपनी Post में Social Share Button लगा सकते है पर जैसा की मैन आपको Post Title में बताया है कि आपको मैं Without Plugin बताउगा तो अब मैं आपको Without Plugin बताता हूँ क्योकि अगर आप Plugin का Use करते है तो आपको उस Plugin को Time To Time Update करना पड़ेगा Otherwise आपकी Blog Performance में Problem आएगी, इसीलिये अब आप Simply HTML और CSS के Through लगायें।
- Mobile Se WordPress Theme Customize Kaise Kare?
- WordPress Me SEO Optimized Post Kaise Likhe – Full Guide
WordPress Post में Without Plugin Social Share Button कैसे लगायें?
- First आप अपने WordPress में Login करें।
- अब आपको Appearence में जाना है और Editor पर Click करके Editor को Open करना है जिसमे आपको एक Warning दिखेगी जिसे आप Yes, I UnderStand पर Click करें।
- अब आप अपने Theme की function.php File को Open करें।
- अब आप नीचे दिए गHello Bloggers, आज मैं आपको WordPress blog में Post के ऊपर और नीचे Social Share Button लगाने के बारे में बताउगा…आपको इतना ज्यादा Trafficए Code को Copy करे और इसे function.php File में सबसे Niche Add करें।
[asg-content-box boxcolor=”green” boxtitle=”” boldtitle=”false” boxexpand=”false” showcontent=”false”]function blog4help_social_sharing_buttons($content) { global $post; if(is_singular() || is_home()){ // Get current page URL $blog4helpURL = urlencode(get_permalink()); // Get current page title $blog4helpTitle = str_replace( ‘ ‘, ‘%20’, get_the_title()); // Get Post Thumbnail for pinterest $blog4helpThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); // Construct sharing URL without using any script $twitterURL = ‘https://twitter.com/intent/tweet?text=’.$blog4helpTitle.’&url=’.$blog4helpURL.’&via=blog4help’; $facebookURL = ‘https://www.facebook.com/sharer/sharer.php?u=’.$blog4helpURL; $googleURL = ‘https://plus.google.com/share?url=’.$blog4helpURL; $bufferURL = ‘https://bufferapp.com/add?url=’.$blog4helpURL.’&text=’.$blog4helpTitle; $whatsappURL = ‘whatsapp://send?text=’.$blog4helpTitle . ‘ ‘ . $blog4helpURL; $linkedInURL = ‘https://www.linkedin.com/shareArticle?mini=true&url=’.$blog4helpURL.’&title=’.$blog4helpTitle; // Based on popular demand added Pinterest too $pinterestURL = ‘https://pinterest.com/pin/create/button/?url=’.$blog4helpURL.’&media=’.$blog4helpThumbnail[0].’&description=’.$crunchifyTitle; // Add sharing button at the end of page/page content $content .= ‘<!– https://www.blog4help.com social sharing. Get Your Code Here: https://www.blog4help.com –>’; $content .= ‘<div class=”blog4help-social”>’; $content .= ‘<h4>SHARE ON</h4> <a class=”blog4help-link blog4help-twitter” href=”‘. $twitterURL .'” target=”_blank”>Twitter</a>’; $content .= ‘<a class=”blog4help-link blog4help-facebook” href=”‘.$facebookURL.'” target=”_blank”>Facebook</a>’; $content .= ‘<a class=”blog4help-link blog4help-whatsapp” href=”‘.$whatsappURL.'” target=”_blank”>WhatsApp</a>’; $content .= ‘<a class=”blog4help-link blog4help-googleplus” href=”‘.$googleURL.'” target=”_blank”>Google+</a>’; $content .= ‘<a class=”blog4help-link blog4help-buffer” href=”‘.$bufferURL.'” target=”_blank”>Buffer</a>’; $content .= ‘<a class=”blog4help-link blog4help-linkedin” href=”‘.$linkedInURL.'” target=”_blank”>LinkedIn</a>’; $content .= ‘<a class=”blog4help-link blog4help-pinterest” href=”‘.$pinterestURL.'” data-pin-custom=”true” target=”_blank”>Pin It</a>’; $content .= ‘</div>’; return $content; }else{ // if not a post/page then don’t include sharing button return $content; } }; add_filter( ‘the_content’, ‘blog4help_social_sharing_buttons’);[/asg-content-box]
अब आप function.php को Save कर दीजिये अब आप अपने Blog में SuccessFully Code Add कर चुके है और अब आपको Next Step में CSS Code Add करना है।
- अब आप Appearence पर Click कीजिये और इसके बाद आप Customize पर Click कीजिये।
- Next Page में आप Additional CSS पर Click कीजिये।
- और नीचे दिये गए CSS को Copy करके आप उस Box में Paste कर दीजिये।
- और इसके बाद फिर आप ऊपर दिए गए Publish Button पर Click कर दीजिये।
[asg-content-box boxcolor=”green” boxtitle=”” boldtitle=”false” boxexpand=”false” showcontent=”false”]/* Disable WhatsApp button on Desktop – By link: https://www.blog4help.com */ @media screen and (min-width: 1024px) { .blog4help-whatsapp { display: none !important; } } .blog4help-link { padding: 2px 8px 4px 8px !important; color: white; font-size: 12px; border-radius: 2px; margin-right: 2px; cursor: pointer; -moz-background-clip: padding; -webkit-background-clip: padding-box; box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); -moz-box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); -webkit-box-shadow: inset 0 -3px 0 rgba(0,0,0,.2); margin-top: 2px; display: inline-block; text-decoration: none; } .blog4help-link:hover,.blog4help-link:active { color: white; } .blog4help-twitter { background: #00aced; } .blog4help-twitter:hover,.blog4help-twitter:active { background: #0084b4; } .blog4help-facebook { background: #3B5997; } .blog4help-facebook:hover,.blog4help-facebook:active { background: #2d4372; } .blog4help-googleplus { background: #D64937; } .blog4help-googleplus:hover,.blog4help-googleplus:active { background: #b53525; } .blog4help-buffer { background: #444; } .blog4help-buffer:hover,.blog4help-buffer:active { background: #222; } .blog4help-pinterest { background: #bd081c; } .blog4help-pinterest:hover,.blog4help-pinterest:active { background: #bd081c; } .blog4help-linkedin { background: #0074A1; } .blog4help-linkedin:hover,.blog4help-linkedin:active { background: #006288; } .blog4help-whatsapp { background: #43d854; } .blog4help-whatsapp:hover,.blog4help-whatsapp:active { background: #009688; } .blog4help-social { margin: 20px 0px 25px 0px; -webkit-font-smoothing: antialiased; font-size: 12px; }[/asg-content-box]
अब आप अपनी Post को Open करके देखे आपके Blog में Social Share Button दिखेंगी तो आप इस तरह से Without Plugin अपने Blog में Button Add कर सकते है।
Friends, I Hope की आपको अपने WordPress Blog Post में Without Plugin Social Share Button कैसे Add करते है पूरी तरह समझ आ गया होगा अगर आपको कोई Problem हो रही है तो आप Comment में पूछ सकते है।
अगर आपको ये Post पसंद आयी तो इसे अपने दोस्तो के साथ Social Media पर Share जरूर करें और आप हमे Social Media पर Follow भी कर सकते है।
#Blog4Help #DilSeBlogging
Leave a Comment