sgdghd.com
is not a complete URL on its own, and if used in a link like <a href="https://wordpress.stackexchange.com/questions/358412/sgdghd.com">
, it will be treated as a relative URL. To properly link to a different domain, you need to include http://
or https://
.
To ensure that a value for href
is a valid URL, you should use esc_url()
when outputting it. That way if a user enters an incomplete URL in the settings, it will still be output correctly:
echo '<a href="';
echo esc_url( $settings['url'] );
echo '">';
Related Posts:
- How to properly insert a link to a template in WordPress?
- How to enable HTML tags in category description without breaking the category page
- Display child-page links in sidebar on both Parent Pages AND Child Pages
- Multisite – Display different header content based on which site is accessed
- how to remove replicating a tag inside loop?
- Why Won’t My Inputs in a form with a Get method work together?
- parts of url disappear when using # inside href=”” [closed]
- Settings API callback function inserts html quotes from nowhere
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Different post styles depending on category
- How create a Shortcode with hover and complex options
- How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]
- Dot is not added at the end of href
- WordPress Multiple Navigation bars
- Position banner to right of logo in header – messed up my header file
- Commenting out unwated CSS/scripts in HTML with PHP
- How to separate HTML and WordPress files
- Add .htm extention to a custom taxonomy
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Auto 301 to full post permalink? (using : /archive/%post_id% to %post_name% )
- How do I add a custom css to all posts without affecting homepage css? [closed]
- Make PHP work with HTML tags
- Noscript not working as it should in wordpress site
- Show latest posts in a plain HTML website custom widget [closed]
- How to convert select to HTML with PHP tags inside of it [closed]
- Is this spyware on my site or a real Java update?
- Syntax error when I try to insert my loop into an unordered list? [closed]
- Make Current/Active Page Number a Link (WP_LINK_PAGES)
- How to make modifications only to certain elements of an HTML string on the server-side?
- Wrapping a Sidebar within
- Search WordPress using static html page
- Hide HTML element (by class or ID) with PHP
- How to get post permalink url without a href
- Add Codepen animation as Preloader to WordPress
- Path for php file for inserting data through html form
- Function returns text instead of html [closed]
- Printing HTML codes
- Widget back end radio button issue
- get_template_directory_uri() providing wrong path for img
- HTML escaping data with ajax requests
- How i can get post data from database when i am getting post id from url in wordpress
- How to retrieve the data from the sever and displaying it in a page?
- php within html within php
- How to execute html code inside php?
- How to remove coupon dropdown feature
- Trying to prepend a Hashtag symbol to the_tags links [closed]
- Add data-id attribute to child page links
- Add shortcode in my div
- Next post link on a bootstrap button
- trouble with page_id & highlighting current page
- WordPress plug-in for dynamic download link?
- HTML table attributes ignored
- php esc_html_e with an html link inside not working
- Add html link in functions.php files of the theme
- Using ob_start and ob_get_clean with wordpress shortcode
- Any idea how to get something like this to work? [closed]
- How to edit HTML of my website on WordPress? [closed]
- WordPress wp-admin redirect and exception
- How to remove the h6 tag for the entry-category Class
- Override user-edit.php to design own profile page
- wp_insert_post() with HTML tags using PHP
- How to rename woocommerce-billing-fields
- Prevent redirect to wp-login.php
- PHP contact form not redirecting [closed]
- Creating an image from a custom field
- How to Schedule Cronjobs for start of every month and year
- Where can I find the inline-css of my theme header?
- Handling PHP/HTML inside the output of a shortcode function
- Make textarea required. Help [closed]
- How to use the wpsnonce clone post link?
- Extract links from content
- WordPress forms submissions and PHP files
- Menu Custom Data Attributes
- How to add post meta in while loop?
- Adding function to child theme’s function.php
- Highlight the links without using dropdown
- Automatically Add Page Links to Nav Menu
- Illegal string offset error in wordpress theme options textarea
- How to turn each phone number within the $content to a telephone link?
- Creating custom page template from existing PHP site
- wordpress site – using custom database and PHP
- How to use the checked() function to check for a non-empty var
- Calling function in loop causes repeat data
- Remove   from the_excerpt
- How do I access post_meta key with php?
- Find out last 7 days of upload images, last week uploaded image from Gallery and display them in different pages
- Separate array output into a
- Website completely messes up when logging out
- Need help removing […] after excerpt
- Calling PHP Titles inside Javascript Markup
- How can I use custom menus with a Bootstrap WordPress theme?
- Remove in post content
- Initial offset of number of posts in home page on the posts page
- Link to page with posts of specific type
- with PHP within splits the link
- Function Display article [closed]
- Adding attribute to the post.php form tag in wp-admin
- Using php inside javascript [closed]
- Adding custom url to readmore link using get_permalink()