{"id":6415,"date":"2016-02-05T18:25:05","date_gmt":"2016-02-05T23:25:05","guid":{"rendered":"https:\/\/themespress.ca\/?p=6415"},"modified":"2022-09-16T06:58:04","modified_gmt":"2022-09-16T10:58:04","slug":"display-wordpress-default-link-list","status":"publish","type":"post","link":"https:\/\/themespress.ca\/en\/display-wordpress-default-link-list\/","title":{"rendered":"Display WordPress&#8217; Default Link List"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Here&#8217;s a quick tutorial that will allow you to display your WordPress links (from the Links tag) sorted by category. While this tab is technically a thing of the past, it can be useful to have due to interesting backlinks. <\/p>\n<p>Simply add this code where ever you want.<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-5257945\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-5257945\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"php\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">&lt;?php \n\/\/ r&eacute;cuperer la taxonomy des cat&eacute;gories\n$taxonomy = &#039;link_category&#039;;\n$tax_terms = get_terms($taxonomy);\n \n        \/\/ si les cat&eacute;gories existent on boucle\n\tif ($tax_terms) {\n\tforeach ($tax_terms  as $tax_term) {\n\techo &#039;&lt;h2&gt;&#039;. $tax_term-&gt;name .&#039;&lt;\/h2&gt;&#039;;\n\t\/\/ on donne les arguments\n        $args = array(\n\t&#039;category&#039; =&gt; $tax_term-&gt;term_id,\n\t&#039;orderby&#039; =&gt; &#039;name&#039;,\n\t&#039;order&#039; =&gt; &#039;ASC&#039;,\n\t);\n\t\/\/ On recupere les liens attribu&eacute;s et on boucle\n        $bookmarks = get_bookmarks($args);\n\tforeach ( $bookmarks as $bookmark ) {\n\t\/\/ On affiche les liens correspondants\n        printf( &#039;&lt;span class=&quot;links&quot;&gt;+ &lt;a href=&quot;%s&quot;&gt;%s&lt;\/a&gt;&#039;,$bookmark-&gt;link_url, $bookmark-&gt;link_name );\n \n\tprintf( &#039;&lt;\/span&gt;&#039; );\n\t}\n\t}\n}\n?&gt;<\/pre><\/div>\n\t<div class=\"wpb_text_column wpb_content_element\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<p>Links are now dynamic and we can n ow create new categories and add custom category links.<\/p>\n<p>If your current configuration of WordPress does not have the Link tab, add the following filter in your <strong>functions.php<\/strong> file:<\/p>\n\n\t\t<\/div>\n\t<\/div>\n<div id=\"ts-enlighterjs-container-1316054\" class=\"ts-enlighterjs-container-single-enabled  \" style=\"width: 100%;  margin-top: 0px; margin-bottom: 0px;\" data-enlighter-doubleclick=\"true\" data-enlighter-windowbutton=\"true\" data-enlighter-windowtext=\"New Window\" data-enlighter-rawbutton=\"true\" data-enlighter-rawtext=\"RAW Code\" data-enlighter-infobutton=\"false\" data-enlighter-infotext=\"EnlighterJS\" data-enlighter-indent=\"2\"><pre id=\"ts-enlighterjs-pre-1316054\" class=\"\" style=\"white-space: pre-wrap; height: 100%; margin: 0; padding: 0;\" data-enlighter-language=\"standard\" data-enlighter-theme=\"enlighter\" data-enlighter-group=\"\" data-enlighter-title=\"\" data-enlighter-linenumbers=\"true\" data-enlighter-lineoffset=\"1\" data-enlighter-highlight=\"\">add_filter( &#039;pre_option_link_manager_enabled&#039;, &#039;__return_true&#039; );<\/pre><\/div><\/div><\/div><\/div><\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"Here's a quick tutorial that will allow you to display your WordPress links (from the Links tag) sorted by category. While this tab is technically a thing of the past,<div class=\"read-more\"><a class=\"btn button-secondary\" href=\"https:\/\/themespress.ca\/en\/display-wordpress-default-link-list\/\">Read More<\/a><\/div>","protected":false},"author":81,"featured_media":4491,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[283],"tags":[],"class_list":["post-6415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/6415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/users\/81"}],"replies":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/comments?post=6415"}],"version-history":[{"count":0,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/posts\/6415\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media\/4491"}],"wp:attachment":[{"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/media?parent=6415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/categories?post=6415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/themespress.ca\/en\/wp-json\/wp\/v2\/tags?post=6415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}