Tag Archives: Links

Magento 2 Remove Footer Links

You can remove Footer Links by adding the below line to layout xml.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <referenceBlock name="footer_links" remove="true"/>
<referenceBlock name="cms_footer_links_container" remove="true" />

WordPress Plugin Links – PHPCodezLinks

It can be used to list link categories and its links

== Description ==

PHPCodez Links lists the link categories and its links. The output can be managed from the back end

1) We can restrict the number of link categories
1) We can restrict the number of links
2) We can sort links and link categories by its name or id
3) We can select categories to list

== Installation ==

1. Upload the plugin folder to your /wp-content/plugins/ folder.

2. Go to the **Plugins** page and activate the plugin.

3. Go to appearance->widget area and drag the widget “PHPCodez Links” to the widget area to have this on the sidebar .

Click here to download the plugin

WordPress query to fetch links under a given category


// ‘links’ is the slug name of the link category link

$linkeQry=”SELECT * FROM wp_links as link INNER JOIN wp_term_relationships ON (link.link_id = wp_term_relationships.object_id)

INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) AND wp_term_taxonomy.taxonomy = ‘link_category’

INNER JOIN {$wpdb->prefix}terms as c ON c.term_id=wp_term_taxonomy.term_id

WHERE c.slug=’links'”;

$linksData = $wpdb->get_results($linkeQry);



<?php foreach($linksData as $key=>$link) {  ?>

<li><a href=”<?php echo $link->link_url; ?>” target=”_blank”><?php echo $link->link_name; ?></a></li>

<?php } ?>