Home  >  Article  >  Backend Development  >  typecho theme pageNav paging problem

typecho theme pageNav paging problem

WBOY
WBOYOriginal
2016-08-04 09:22:142137browse

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>

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>

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>
Statement:
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