• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Retweetable Blockquote in WordPress Posts With CSS, Js

By Abhishek Ghosh June 8, 2018 10:19 pm Updated on January 4, 2019

Retweetable Blockquote in WordPress Posts With CSS, Js

Advertisement

In our previous article, we demonstrated how to create retweetable hyperlink within WordPress posts with Twitter icon, like this one – Tweet this real working link . We Can Create Retweetable Blockquote in WordPress Posts With CSS, Js For Special Articles Too. Embedding the CSS and Javascript in Post Will Do the Job. Below is screenshot after hover for post decoration (real working thing is after it).

Retweetable Blockquote in WordPress Posts With CSS

 

How To create Retweetable Blockquote in WordPress Posts

 

First, study the previous work :

Vim
1
<a class="twitter" title="Click to tweet this" href="http://twitter.com/home/?status=Twitter Hashtag, @ and Inline Tweet in WordPress https://thecustomizewindows.com/2014/08/integrate-twitter-hashtag-and-inline-tweet-in-wordpress/ by @AbhishekCTRL" target="_blank" rel="noopener nofollow">Tweet this real working link <i class="icon-twitter"></i></a>

Twitter server automatically handles the Base64 encoding.

Advertisement

---

This is result of poor man’s way :

Those junk vintage javascripts not needed to retweet.

– Abhishek Ghosh, TWEET THIS QUOTE

Poor man’s server and CDN is slower – loading too much Js will kill the need. This is what is used above :

Vim
1
2
3
<blockquote><a class="twitter" title="Click to tweet this" href="http://twitter.com/home/?status=Twitter Hashtag, @ and Inline Tweet in WordPress https://thecustomizewindows.com/2014/08/integrate-twitter-hashtag-and-inline-tweet-in-wordpress/ by @AbhishekCTRL" target="_blank">Those junk vintage javascripts not needed to retweet. </a>
</blockquote>
<small><a class="twitter" title="Click to tweet this" href="http://twitter.com/home/?status=Twitter Hashtag, @ and Inline Tweet in WordPress https://thecustomizewindows.com/2014/08/integrate-twitter-hashtag-and-inline-tweet-in-wordpress/ by @AbhishekCTRL" target="_blank">- Abhishek Ghosh, <i class="icon-twitter"></i> TWEET THIS QUOTE</a></small>

You can see, the above is just matter of presentation. The thing does the job and hardcoded. In case you are not that much impressed, I have funky way using javascript :

See the Pen vrgBEL by Abhishek Ghosh (@abhishekghosh-the-encoder) on CodePen.

You can see the full code here on CodePen (which is a modified rip-off from one StackOverflow answer). In that code, you need lot of changes to modify for your own. By the way, you need jQuery loading on front-end to make it working. First part is HTML, which you need to change :

Vim
1
2
3
4
5
<div align="center"><div style="width:60%">
  
  <a style="text-decoration: none;" class="autotweet" href="javascript:void(0)" shorturlrt="https://thecustomizewindows.com/2014/08/integrate-twitter-hashtag-and-inline-tweet-in-wordpress/" urlrt="https://thecustomizewindows.com/2014/08/integrate-twitter-hashtag-and-inline-tweet-in-wordpress/"><div ><div class="textrt">Those junk vintage javascripts not needed to retweet.</div><i class="fa fa-twitter fa-lg" aria-hidden="true"></i><small>-Abhishek Ghosh, TWEET THIS</small></div></a>
  
</div></div>

On CSS, you do not need style for body, you need only this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.autotweet > div{
border:2px solid #0084B4;
color:#0084B4;
border-radius:5px;
padding:15px;
text-align:right;
font-size:13px;
font-weight: 400;
position: relative;
}
.autotweet:hover > div{
box-shadow: 0px 0px 3px 0px #656565;
background-color:#60A8DC;
color:#ffffff;
}
.autotweet > div::before {
content: "\201C";
font-family: Georgia, serif;
font-size: 65px;
font-weight: bold;
color: #0084B4;
position: absolute;
left: 10px;
top:0px;
}
.autotweet:hover > div::before {
content: "\201C";
font-family: Georgia, serif;
font-size: 65px;
font-weight: bold;
color: #ffffff;
position: absolute;
left: 10px;
top:0px;
}
.autotweet > div::after{
content: "";
}
.autotweet > div > div{
font-size:20px;
text-align:left;
font-weight: 300;
padding-left:35px;
}

And the Js needs moification :

Vim
1
2
3
4
5
6
7
8
9
$( document ).ready(function() {$(".autotweet").on("click", function(){
var textToRt=encodeURIComponent($(this).find('.textrt').text());
    var shortUrlToRt=encodeURIComponent($(this).attr('shorturlrt'));
    var urlToRt=encodeURIComponent($(this).attr('urlrt'));
 
  window.open('https://twitter.com/intent/tweet?text='+textToRt+'&via=AbhishekCTRL&related=AbhisheCTRL&hashtags=AbhishekGhosh&url='+urlToRt+'&counturl='+shortUrlToRt, 'mini_tweet', 'height=320, width=640, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
});
});

Note hashtags=AbhishekGhosh, I used AbhishekGhosh as hashtag.

Tagged With Twitter inline , twitter

This Article Has Been Shared 919 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Retweetable Blockquote in WordPress Posts With CSS, Js

  • Best features of WordPress

    This article Best features of Wordpress describes the features which has established Wordpress in the top position in search engine war.

  • Free Blogging options : Advantages of WordPress over Blogger

    WordPress has some advantages over Blogger. We’ve compared Free WordPress blog with Google’s Blogger blog in simple words for any level of users fumbling to choose between WordPress and Blogger.

  • Clean Installation of WordPress on a Live Domain without Maintenance Mode

    Clean Installation of WordPress on a Live Domain without Maintenance Mode means you can browse this post page but we are installing WordPress freshly behind.

  • Create a custom login page in WordPress

    This tutorial will show you how to set up a custom login page in WordPress. No special knowledge required.

  • Get your Twitter’s tweet as RSS feed and JSON’s url plus widget codes

    You can fetch your Twitter account’s tweets as RSS feed or the get the JSON’s url with this nice and easy trick.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (20K Followers)
  • Twitter (4.9k Followers)
  • Facebook (5.8k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.2k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Cloud Computing : Cybersecurity Tips for Small Business Owners January 20, 2021
  • Arduino : Independently Blink Multiple LED January 18, 2021
  • What is a Loosely Coupled System? January 17, 2021
  • How To Repack Installed Software on Debian/Ubuntu January 16, 2021
  • Components of Agile Software Development January 15, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Retweetable Blockquote in WordPress Posts With CSS, Js," in The Customize Windows, June 8, 2018, January 20, 2021, https://thecustomizewindows.com/2018/06/retweetable-blockquote-in-wordpress-posts-with-css-js/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy