Barba: How to disable barba.js in some urls?

Created on 23 May 2020  路  3Comments  路  Source: barbajs/barba

I have WordPress website, and i have problem with admin panel - localhost/x/wp-admin/
If i use barba i have problem with time sessions -
Your session has expired. Please login to continue.
Please help :)

@barbcore question

Most helpful comment

Hi @ProdesignerAgency,

You can disable Barba on some links by using a prevent strategy:

<!-- prevent Barba from running on a specific link -->
<a href="localhost/x/wp-admin/" data-barba-prevent="self">Admin</a>

<!-- prevent Barba from running on an entire block -->
<div data-barba-prevent="all">
  <p>text content</p>
  <a href="link-1">link-1</a>
  <a href="link-2">link-2</a>
</div>

See https://barba.js.org/docs/advanced/strategies/#prevent for more informations.

Please let me know if it fits your need :wink:

All 3 comments

Hi @ProdesignerAgency,

You can disable Barba on some links by using a prevent strategy:

<!-- prevent Barba from running on a specific link -->
<a href="localhost/x/wp-admin/" data-barba-prevent="self">Admin</a>

<!-- prevent Barba from running on an entire block -->
<div data-barba-prevent="all">
  <p>text content</p>
  <a href="link-1">link-1</a>
  <a href="link-2">link-2</a>
</div>

See https://barba.js.org/docs/advanced/strategies/#prevent for more informations.

Please let me know if it fits your need :wink:

@ProdesignerAgency,

Did you ended to make it work?
Thanks for the feedback :wink:

@ProdesignerAgency,

Barba doesn't have any effects on session duration, as it is a server-side setting.
Closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mexikaner9 picture Mexikaner9  路  3Comments

hugobqd picture hugobqd  路  3Comments

hosxes picture hosxes  路  3Comments

shanewmurphy picture shanewmurphy  路  3Comments

oguilleux picture oguilleux  路  3Comments