• 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 396 Times!

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

  • 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

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

  • Exploring the Benefits and Advantages of Microsoft’s Operating System March 22, 2023
  • Web Design Cookbook: Accessibility March 21, 2023
  • Online Dating: How to Find Your Match March 20, 2023
  • Web Design Cookbook: Logo March 19, 2023
  • How Starlink Internet Works March 17, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT