Home > Backend Development > PHP Tutorial > typecho theme pageNav paging problem

typecho theme pageNav paging problem

WBOY
Release: 2016-08-04 09:22:14
Original
2222 people have browsed it

I want to add a page-number class attribute to all numbers in the paging, including the
theme code of the currentClass class as follows:

<code><?php $this->pageNav('Newer', 'Older', 1, '...', array('wrapTag' => 'nav', 'wrapClass' => 'page-nav', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current' )); ?>
</code>
Copy after login
Copy after login

typecho theme pageNav paging problem

As shown in the picture above, now I only know how to add a page-number attribute to currentClass, but I want to add this attribute to all numbers. I don’t know if there is a good way. I haven’t found it yet. I hope someone can do it. Please help me solve it, thank you!

typecho theme pageNav paging problem

Reply content:

I want to add a page-number class attribute to all numbers in the paging, including the
theme code of the currentClass class as follows:

<code><?php $this->pageNav('Newer', 'Older', 1, '...', array('wrapTag' => 'nav', 'wrapClass' => 'page-nav', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current' )); ?>
</code>
Copy after login
Copy after login

typecho theme pageNav paging problem

As shown in the picture above, now I only know how to add a page-number attribute to currentClass, but I want to add this attribute to all numbers. I don’t know if there is a good way. I haven’t found it yet. I hope someone can do it. Please help me solve it, thank you!

typecho theme pageNav paging problem

Actually, it can be done in CSS

<code class="css">.page-nav a:not([class~="extend"]) {
    /* 数字的样式 */
}</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template