simonpadbury / b5st Goto Github PK
View Code? Open in Web Editor NEWWordPress starter theme with Bootstrap 5 and Bootstrap Icons
License: The Unlicense
WordPress starter theme with Bootstrap 5 and Bootstrap Icons
License: The Unlicense
First off, thanks for such a clean, well coded theme.. greatly apprecaited!
Based on the feedback from W3C HTM Validator, I came across this error.
To duplicate, create a menu with child pages.
You will see that the child items have duplicate class attributes, such as:
<li id="menu-item-39" class="menu-item menu-item-type-post_type menu-item-object-page nav-item nav-item-39"><a class="dropdown-item" href="http://dev.local/page/" class="nav-link">List of Languages</a></li>
This appears to be created here:
$attributes .= ( $args->walker->has_children ) ? ' class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"' : ' class="nav-link"'; $item_output = $args->before; $item_output .= ( $depth > 0 ) ? '<a class="dropdown-item"' . $attributes . '>' : '<a' . $attributes . '>';
Where the child item inherits the attributes of the parent, but also adds another class attribute with the value of "dropdown-item".
Suggested edit:
Change line 44 of navbar.php from:
$attributes .= ( $args->walker->has_children ) ? ' class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"' : ' class="nav-link"';
To:
$classes = ( $args->walker->has_children ) ? ' class="nav-link dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"' : ' class="nav-link"';
AND Line 47 of navbar.php from:
$item_output .= ( $depth > 0 ) ? '<a class="dropdown-item"' . $attributes . '>' : '<a' . $attributes . '>';
To:
$item_output .= ( $depth > 0 ) ? '<a class="dropdown-item"' . $attributes . '>' : '<a' . $attributes .' '. $classes . '>';
Full error message: "Warning: Array to string conversion in \app\public\wp-content\themes\theme-name\functions\navbar.php on line 44."
This is only showing up on the site when we upgraded to PHP 8.0. Any ideas on how to fix this?
Thanks!
I`m trying to make this team support Woocommerce which should be super easy but after declaring support i get no images on the product site. It doesnt happen with b4st. Do you know what can be the reason?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.