• 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
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, 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

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • OpenShift OctoPress Auto install Script

    OpenShift OctoPress Auto install Script is an Advanced Script to Run OctoPress on Free OpenShift PaaS Practically Without Any Knowing Ruby or Git.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

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

Get new posts by email:

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 (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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