Last update at :2024-07-02,Edit by888u
I won’t say much about the role of breadcrumb navigation. Anyway, each has its own purpose. I have shared the use of Yoast Breadcrumbs plug-in before. However, as wordpress takes up too much resources, if you can use less plug-ins, you can use plug-ins instead of plug-ins. Just now when Snail was organizing the website, he found this plug-in-free breadcrumb effect which is quite good. I recorded and organized it for future needs.
The first step is to add it to the Functions.php file
function get_breadcrumbs(){global $wp_query;
if ( !is_home() ){
// Start the ULecho \\\'
\\”;}}The second step is to add the breadcrumb plug-in at the appropriate location on the page where you need to add it
The third step, style definition
ul.breadcrumbs {list-style: none;padding: 0;margin: 0;font-size:12px;}ul.breadcrumbs li {float: left;margin: 0 5px 0 0;padding: 0;}< /p>
In summary, through the above three steps, you can achieve the breadcrumb effect without plug-ins, and the style and layout can be modified slightly.
Recommended site search: php virtual space, US php space, mainland China space, php host space, Korean server rental, Chinese domain name, Chinese international domain name, Taiwan server, mainland China registration-free host, Hong Kong vps host,
发表评论