I have a working whatsapp <a> tag in this way:
<a class="whatsapp share-local-button
data-action="share/whatsapp/share"
target="_blank" href="whatsapp://send?text=link#withMark" >
<i class="fa fa-whatsapp"></i>
</a>
This works, but what is in href is simply the shared text, not the url, which is the current....
I tried with
data-href="link#withMark"
But no different results...
How can I share my customized url and not the current one?
Try adding something like a bit of PHP if you are able to. if you want to keep it clean html then just ignore this.
in php u define the link u want to set in a variable, then just add <?php $yourvariable ?> to the whatsapp://send?text= INSERT HERE
Add a JavaScript code as I did to dynamically add the link.
Also it is reusable and can be used in any page.
Here, we set the href of the element having class=whatsapp to it's href+ the site link.
Try running the code
document.getElementsByClassName('whatsapp')[0].href+=window.self.location;
<a class="whatsapp share-local-button
data-action="share/whatsapp/share"
target="_blank" href="whatsapp://send?text=">
<i class="fa fa-whatsapp">whatsapp</i>
</a>
Related
I am creating a custom google blogger template, I tried adding an about us page but whenever I try to visit "https://mywebsite.com/p/about.html" it shows the same content as home page. Is there any data attribute to render the about page content?
I have been scrambling my brain for 1-2 days and can't seem to find a solution.
<li class='nav-item'>
<a class='nav-link' href='/p/about.html'>
<b:class cond='data:blog.url == data:blog.homepageUrl + "p/about.html"' name='active'/>
<i class='fas fa-user fa-fw me-2'/>
About Me
</a>
</li>
Also the above snippet is supposed to add active class to that nav-link but it's not working. Can you guys spot my mistake?
Here is my full code.
https://jsfiddle.net/07at4vdc/3/
Assuming that /about is another html file and not something like React or Handlebars just try setting the path more clearly.
<a class='nav-link' href='./main/about.html'> for example. The ./ should help you navigate to the file
I have an iframe that I change with buttons using
<a href="titanors-extended-functions.html" target="iframe">
<p>Titanors Extended Functions</p>
</a>
but I also want to change the Iframe with a hashtag in the URL such as https://example-of-url.com/#titanors-extended-functions
is this possible, and if so how do I do it?
Add a name attribute to your link:
<a name = "yourLinksName" href="titanors-extended-functions.html" target="iframe">
<p>Titanors Extended Functions</p>
</a>
And when you're linking to it, you'll use the # in the link
or
http://www.PathGoesHereAnd#yourLinksName
Hope that makes sense!
I have the following code based others tutorials (look at the picture):
When I run the code through the browser, the button is appeared but when I click on it the pdf does not downloaded (or appeared to other html page).I have checked if there is any problem with the file link but when I run it through browser is appeared to browser properly. I must note that this code is included to php file ( for example file.php).CODE
HTML:
<button class="etc etc">
<i class="fa fa-download"></i>Katabaste Odygies
</button>
Try changing your anchor tag to look like this:
<button class="etc etc">
<a href="itdb/a.pdf">
<i class="fa fa-download"></i>Katabaste Odygies
</a>
</button>
When people click the <i> tag, it is not inside the <a> so the download is not being triggered.
Also, you are referencing the file incorrectly for a web server.
I wanted to add social profile links schema for SEO,
Now according to https://developers.google.com/structured-data/customize/social-profiles
<a itemprop="sameAs" href="http://www.facebook.com/your-company">FB</a>
It should work, but what if in my code it has to be:
<a itemprop="sameAs" href="https://twitter.com/your-company">
<i class="fa fa-twitter"></i>
</a>
Would this be understood by Search Engines correctly as a twitter link or would they just understand it as a social media link without being able to figure out that the href points to twitter? I'm pretty sure it works, but I'd like to be more sure.
I am trying to implement facebook share button in my webpage. Here is my code:
<a class="btn btn-social-icon btn-facebook" href="https://www.facebook.com/sharer/sharer.php?u=test.com" target="_blank">
<i class="fa fa-facebook"></i>
</a>
What are my options if I want to share just a simple text, not an URL ? Is there some kind of text param ?
Facebook allows meta tags to specify some parameters to pass over.
See facebooks developer page for more info.