Title: Find/replace on pagination using PHP
Last modified: August 21, 2016

---

# Find/replace on pagination using PHP

 *  [ncj](https://wordpress.org/support/users/ncj/)
 * (@ncj)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/findreplace-on-pagination-using-php/)
 * I’m trying to do a find/replace on the pagination links using PHP but am having
   trouble putting this code into a variable so that I can do a basic str_replace
   command. Can anyone recommend a way to do this?
 * This is the code rendering the pagination:
    `<?php if(function_exists('wp_page_numbers')){
   wp_page_numbers(); } ?>`

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/findreplace-on-pagination-using-php/#post-4432285)
 * That is not a WordPress function. If it is from the plugin of the same name, 
   there are no filters provided for altering its functionality. Seeing that the
   plugin is outdated and unsupported, **if** it is from that plugin, just go ahead
   and directly hack the function’s source code.
 *  Thread Starter [ncj](https://wordpress.org/support/users/ncj/)
 * (@ncj)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/findreplace-on-pagination-using-php/#post-4432358)
 * Thanks, that makes sense now. I ended up finding a solution to the pagination
   issue that didn’t involve a PHP find/replace and was a little less of a hack.

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

The topic ‘Find/replace on pagination using PHP’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [ncj](https://wordpress.org/support/users/ncj/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/findreplace-on-pagination-using-php/#post-4432358)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
