all href url's starts with // in wordpress
like
<a href="//www.example.com" >Test</a>
But i want like this
<a href="https://www.example.com" >Test</a>
please help me out resolve this issue
Related
I'm using Hoot Business Theme, i can't find where I can insert target_blank" there is no loop.php in this theme. Is there any other way to open wordpress post in new tab?
The simplest way to achieve this without messing about in your template files is with jQuery:
$('a.addSomethingBlogSpecificHere').attr('target','_blank');
You need to add target="_blank" in anchor tag HTML like :
<a href="#" target="_blank" > Label Name </a>
Hi i have this page template past conferences single and i have this href tag
<a href="/past-conferences-single/<?php the_slug(); ?>" class="wrapper" style="background-image:url('<?=$url?>')">
and my href link goes this way
past-conference-single/2013-inagural-diversity-abroad-conference-5/
i want that when i click on this page goes to this page template past-conference-single and with the content is dynamic based on the slug.
How will i able to do this?
Any help is muchly appreiciated. TIA
For my site under wordpress i am having a very wired issue with 404 warning appearing from Google (GWT) and my 404 plugin.
I get hundred of 404 like : /article-name/email#website.com
I checked everywhere the email doesnt appear on the site and i checked database, those links are nowhere to be found.
Also i removed my email from everywhere on the site and it doesnt help gogle still think those are broken links on my site.
Would you have an idea of how to fix this ?
thx u !
I ran into the exact same problem today and was able to solve it.
Here is my solution:
The root cause for my problem, (likely this one as well) is that I did some social media linking via the theme I installed. There are Facebook page etc, and there is Email.
When rendered
<li class="facebook">
<a href="https://www.facebook.com/your.page" target="_blank">
<i class="fa fa-facebook"></i>
</a>
</li>
And for the email icon, it is the following:
<li class="mail">
<a href="email#website.com" target="_blank">
<i class="fa fa-envelope"></i>
</a>
</li>
when you click on this <a> tag, it will point to /article-name/email#website.com because it is interpreted as a relative url, whereas the Facebook link is an absolute url since it has https://
To Fix This
use mailto:email#website.com instead of email#website.com for your email address.
The theme probably should wrote a href="mailto:{{email}}" in their template. But if they didn't, you should write mailto: yourself.
According to my experience, There is some additional script added in your wordpress file. try to remove header.php, footer.php one by one and see error comes or not. If error doesn't come then check your code in these files. I am sure there is some script added in any file.
Resave your permalink settings, that should sort it out, but information can only get appended to urls via the .access file, which is set in the permalinks section. I'd check that if I was you.
I'm new to wordpress, in my feed (rss2) i've noticed that links are displayed like this:
<a title="myTitle" href="" target="_blank">my text</a>
As you can see the href attribute is empty because the rss2 function
get_the_content_feed with the filter "rss2" probably cut off href attribute.
Is it possible to retrieve href attribute?
Example of what I want
<a title="myTitle" href="http://www.mylink.com" target="_blank">my text</a>
Thank you
I post this in case someone needs, I solved this problem, it was a plugin called RSS Image Feed (https://wordpress.org/plugins/rss-image-feed/) that conflicted with ancor tags.
Disable it and it works again.
Cheers
I got a copy of the index.php file with a different name (profile.php) and i create a link to profile.php on the index.php file like this:
<a href ="<? php bloginfo ('template_url');?> / profile.php"> profile </ a>
But when I click on the link opens a completely blank page
You have unnecessary white spaces in the href attribute which creates the following link:
http://yourdomain.com/wp-content/themes/yourtheme%20/%20profile.php
Also in your code you have <? php but it should be without white space <?php
Change your line to:
<a href ="<?php bloginfo ('template_url');?>/profile.php"> profile </ a>