Jump to content

[HELP] Remove Index.php from Breadcrumbs URL


faedah jaya

Recommended Posts

Hello,
I want to use the mydomain.com link without index.php
How do I delete the /index.php mydomain.com/index.php link on breadcrumbs?

<!--Begin Breadcrumbs-->
<section id="breadcrumbs">
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-8 col-sm-7 col-xs-12" id="xshide">
<p><i class="fas fa-home"></i>{$breadcrumbnav|replace:'Portal Home':'Home'|replace:' > ':'<i class="fas fa-angle-double-right"></i>'}</p>

Thank-you!

Breadcrumbs.png

Link to comment
Share on other sites

Lazy way with CSS:

.breadcrumb li:first-child {
    display:none;
}
.breadcrumb li:nth-child(2):before {
    content:" ";
}

More correct way with an action hook:

<?php

add_hook("ClientAreaPage", 1, function($vars)
{
    unset($vars['breadcrumb'][0]); // Removing first breadcrumb from array
    return array("breadcrumb" => $vars['breadcrumb']);
});

Same result.

Edited by Kian
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated