{"id":4180,"date":"2025-01-28T16:58:12","date_gmt":"2025-01-28T15:58:12","guid":{"rendered":"https:\/\/wpmastertoolkit.com\/module\/raccourcisseur-de-liens\/"},"modified":"2025-01-28T17:09:29","modified_gmt":"2025-01-28T16:09:29","slug":"raccourcisseur-de-liens","status":"publish","type":"module","link":"https:\/\/wpmastertoolkit.com\/en\/module\/link-shortener\/","title":{"rendered":"Link shortener"},"content":{"rendered":"<h1 class=\"wp-block-heading\">Create short links with WPMasterToolKit's Link Shortener module<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">Link management is an essential task for WordPress site owners. Whether you want to share aesthetically pleasing links, analyze clicks or generate QR codes, the <strong>Link Shortener<\/strong> from WPMasterToolKit is designed to meet these needs. This module lets you create short links with 301 redirects and record click statistics directly from your WordPress dashboard.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Which plugin can the Link Shortener module replace?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The module <strong>Link Shortener<\/strong> can usefully replace popular solutions such as <strong>Pretty Links<\/strong> or <strong>taap.it<\/strong>which offer similar link management and shortening functionalities. Thanks to its native, lightweight integration, this module limits site overload by activating only the functions you need.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Key features of the Link Shortener module<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Create customized short links<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The module adds a new Custom Post Type to WordPress named <strong>Short Links<\/strong>. Each shortened link is associated with a unique \"slug\", which can be generated automatically or defined manually by the user. For example, an original link such as <code data-no-auto-translation=\"\">https:\/\/example.com\/promotions\/janvier-2025<\/code> can be shortened to <code data-no-auto-translation=\"\">https:\/\/example.com\/sl\/janv25<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>301 redirects and click tracking<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When a user accesses a short link, they are redirected via a 301 redirect to the specified target URL. The module records each click and displays these statistics in the administration interface, enabling you to monitor the performance of your campaigns.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>QR codes for easy access<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Each shortened link automatically generates a QR code, which can be downloaded and used for your physical media (flyers, posters, etc.).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Column customization in administration<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the list of short links, custom columns are added to display :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The short link.<\/li>\n\n\n\n<li>Target URL.<\/li>\n\n\n\n<li>Number of clicks.<\/li>\n\n\n\n<li>Publication status (active or draft).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>Exclude short links from sitemaps<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid cluttering your XML sitemap with technical links, the module automatically excludes Short Links (CPT) from the sitemap generated by WordPress.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>Simplified editing interface<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A customized form simplifies the creation and editing of short links. Users can :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enter a title and description.<\/li>\n\n\n\n<li>Define a target URL for redirection.<\/li>\n\n\n\n<li>Set up a custom slug or generate a random one.<\/li>\n\n\n\n<li>Activate or deactivate the link with a toggle button.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to use the Link Shortener module<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Activate the module<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that the <strong>Link Shortener<\/strong> is enabled in the WPMasterToolKit configuration interface. If the module is not activated, its PHP classes will not be loaded, thus preserving your site's performance.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Create a short link<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the <strong>Short Links<\/strong> in your WordPress dashboard.<figure class=\"wp-block-image size-full\"><img alt=\"WP Toolkit interface for creating short links\" decoding=\"async\" width=\"303\" height=\"141\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-25.png\" class=\"wp-image-4184\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-25.png 303w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-25-300x140.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-25-18x8.png 18w\" sizes=\"(max-width: 303px) 100vw, 303px\" \/><\/figure><\/li>\n\n\n\n<li>Click on \"Add a new short link\".<figure class=\"wp-block-image size-large\"><img alt=\"Page for creating WordPress short links\" fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-1024x356.png\" class=\"wp-image-4182\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-1024x356.png 1024w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-300x104.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-768x267.png 768w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-1536x533.png 1536w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23-18x6.png 18w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-23.png 1843w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li>\n\n\n\n<li>Fill in the fields :<br><ul class=\"wp-block-list\"><\/ul><ul class=\"wp-block-list\"><li><strong>Customized slug<\/strong> Choose a unique identifier for your short link.<\/li><li><strong>Redirect URL<\/strong> Enter the target URL.<\/li><li><strong>Title and description<\/strong> Add additional information to organize your links.<\/li><\/ul><figure class=\"wp-block-image size-large\"><img alt=\"Shortened URL link editor with QR code.\" decoding=\"async\" width=\"1024\" height=\"429\" class=\"wp-image-4185\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-1024x429.png\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-1024x429.png 1024w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-300x126.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-768x322.png 768w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-1536x643.png 1536w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26-18x8.png 18w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-26.png 1822w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li>\n\n\n\n<li>Save the link.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: View statistics<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Short Links list, you can view the number of clicks, check the publication status and easily copy the shortened URL.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"WordPress short link management chart.\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"313\" src=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-1024x313.png\" class=\"wp-image-4186\" srcset=\"https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-1024x313.png 1024w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-300x92.png 300w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-768x235.png 768w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-1536x469.png 1536w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27-18x6.png 18w, https:\/\/wpmastertoolkit.com\/wp-content\/uploads\/2025\/01\/image-27.png 1836w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Our technical choices for a high-performance module<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>Using a Custom Post Type<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By using a dedicated Custom Post Type (<code data-no-auto-translation=\"\">wpmtk-short-link<\/code>), we've integrated this functionality into the WordPress core, ensuring maximum compatibility with other extensions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong>Performance optimization<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Only strictly necessary functions are activated. For example, Short Links do not appear in search results or in the XML sitemap, thus reducing unnecessary queries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>Flexibility thanks to hooks<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Two main filters allow you to customize the module:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code data-no-auto-translation=\"\">wpmastertoolkit\/link_shortener\/post_type<\/code> Edit Custom Post Type name.<\/li>\n\n\n\n<li><code data-no-auto-translation=\"\">wpmastertoolkit\/link_shortener\/default_slug<\/code> Change the default slug used for links.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These filters enable developers to extend functionality as required.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong>Tracking and safety<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Clicks are counted by updating the post's metadata.<\/li>\n\n\n\n<li>User data is secured using the <code data-no-auto-translation=\"\">sanitize_url<\/code> and WordPress permissions (<code data-no-auto-translation=\"\">current_user_can<\/code>).<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The module <strong>Link Shortener<\/strong> from WPMasterToolKit is a simple and effective solution for managing your short links in WordPress. It offers all the essential features, such as click tracking and QR code creation, while remaining lightweight and high-performance. Whether you're a site owner or a campaign manager, this module will enable you to optimize your link-sharing strategy in no time at all.<\/p>","protected":false},"excerpt":{"rendered":"<p>WPMasterToolKit's Link Shortener module makes link management easier for WordPress sites, offering an all-in-one solution that replaces plugins such as Pretty Links or Bitly. It can create short links with 301 redirects, track clicks, and generate QR codes for simplified sharing. Users can manage these links directly via their WordPress dashboard. Thanks to custom filters and actions, the module offers increased flexibility for developers. By integrating these features, WPMasterToolKit simplifies digital management and proves its commitment to powerful, easy-to-use tools.<\/p>","protected":false},"featured_media":0,"parent":0,"template":"","meta":{"_acf_changed":false,"_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":0,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"_surecart_dashboard_logo_width":"180px","_surecart_dashboard_show_logo":true,"_surecart_dashboard_navigation_orders":true,"_surecart_dashboard_navigation_invoices":true,"_surecart_dashboard_navigation_subscriptions":true,"_surecart_dashboard_navigation_downloads":true,"_surecart_dashboard_navigation_billing":true,"_surecart_dashboard_navigation_account":true},"class_list":["post-4180","module","type-module","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module\/4180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/module"}],"about":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/types\/module"}],"wp:attachment":[{"href":"https:\/\/wpmastertoolkit.com\/en\/wp-json\/wp\/v2\/media?parent=4180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}