Title: Plugin Suggestion &#8211; Additional Class Names
Last modified: August 20, 2016

---

# Plugin Suggestion – Additional Class Names

 *  [wee-beastie](https://wordpress.org/support/users/wee-beastie/)
 * (@wee-beastie)
 * [14 years, 10 months ago](https://wordpress.org/support/topic/plugin-suggestion-additional-class-names/)
 * Great plugin! I found it particularly useful for paginated single posts, where
   the default WordPress options leave something to be desired. Thank you!
 * I have one minor suggestion:
 * Add class names to next and previous page links. Let’s use previous page link
   as an example:
 *     ```
       <a class="prev-page" href="#">Previous Page</a>
       <span class="inactive prev-page">Previous Page</a>
       ```
   
 * I think doing this for both the previous and next page links would add a nice
   bit of flexibility to your plugin, with minimal changes to the plugin itself.
   I edited the plugin to do this like so:
 *     ```
       function previousPage($paged) {
   
       	if ($this->pbOptions ["pdisplay"] == "never")
       		return;
   
       	if (($this->paged == 1) && ($this->pbOptions ["pdisplay"] == "auto"))
       		return;
   
       	$text = $this->tagReplace($this->pbOptions ["prev"], $this->paged);
       	echo ($this->paged == 1) ? '<span class="inactive prev-page">' . $text . "</span>\n" : '<a class="prev-page" href="' .
       				$this->create_link ( $this->paged - 1 ) . '"' . $this->tooltip ($this->paged - 1 ) . '>' .
       				$text . "</a>\n";
       }
       ```
   
 * Pretty simple, but you may want to handle it differently (if at all). Feel free
   to take or leave this suggestion — just putting it out there in case it seems
   sensible to you. Thanks again for a great plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [latz](https://wordpress.org/support/users/latz/)
 * (@latz)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-suggestion-additional-class-names/#post-2226367)
 * Your suggestion sounds very reasonable. I will implement them in the next version
   of pagebar.
 *  Thread Starter [wee-beastie](https://wordpress.org/support/users/wee-beastie/)
 * (@wee-beastie)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-suggestion-additional-class-names/#post-2226391)
 * Glad to hear it. Thanks again!
 * Ps. Do you accept PayPal donations?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Plugin Suggestion – Additional Class Names’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/pagebar_fbfbfb.svg)
 * [Pagebar2](https://wordpress.org/plugins/pagebar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pagebar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pagebar/)
 * [Active Topics](https://wordpress.org/support/plugin/pagebar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pagebar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pagebar/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [wee-beastie](https://wordpress.org/support/users/wee-beastie/)
 * Last activity: [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-suggestion-additional-class-names/#post-2226391)
 * Status: not a support question