Title: macropolo's Replies | WordPress.org

---

# macropolo

  [  ](https://wordpress.org/support/users/macropolo/)

 *   [Profile](https://wordpress.org/support/users/macropolo/)
 *   [Topics Started](https://wordpress.org/support/users/macropolo/topics/)
 *   [Replies Created](https://wordpress.org/support/users/macropolo/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/macropolo/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/macropolo/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/macropolo/engagements/)
 *   [Favorites](https://wordpress.org/support/users/macropolo/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Math Captcha] How to show inputbox show after mathematical operation?](https://wordpress.org/support/topic/how-to-show-inputbox-show-after-mathematical-operation/)
 *  [macropolo](https://wordpress.org/support/users/macropolo/)
 * (@macropolo)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/how-to-show-inputbox-show-after-mathematical-operation/#post-8381968)
 * I’m also tried to figure this out, and I find the solution.
    To achieve this 
   result you should change variable value in “wp-math-captcha/includes/class.core.
   php”.
 * Change
    `$rnd_input = mt_rand( 0, 2 );` to `$rnd_input = 2;`
 * And input box will always be at the end.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Permalinks] Latest version does not work with post preview](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/)
 *  [macropolo](https://wordpress.org/support/users/macropolo/)
 * (@macropolo)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/#post-7339025)
 * Now all previews works perfectly, thanks Sami!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Permalinks] Latest version does not work with post preview](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/)
 *  [macropolo](https://wordpress.org/support/users/macropolo/)
 * (@macropolo)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/#post-7339020)
 * > This is exactly you guys are saying?
 * Yes, I suppose.
 * I create page
    `http://www.example.com/foo` save it as draft, and when I press“
   Preview” I see it without problems `http://www.example.com/?page_id=4779&preview
   =true`
 * Then, if I change url for something different, for example
    `http://www.example.
   com/foobar` link in for preview became `http://www.example.com/foobar&preview
   =true` and since then I see 404, because url redirect to `http://www.example.
   com/foobar`
 * I found the piece of code that causes this issue
 * From line 187:
 *     ```
       if ( $posts[0]->post_status == 'draft' ) {
             $originalUrl = "?p=" . $posts[0]->ID;
           } else {
             $originalUrl =  preg_replace( '@/+@', '/', str_replace( trim( strtolower($posts[0]->meta_value),'/' ),
                           ( $posts[0]->post_type == 'page' ?
                               custom_permalinks_original_page_link($posts[0]->ID)
                               : custom_permalinks_original_post_link($posts[0]->ID) ),
                            strtolower($request_noslash) ) );
           }
         }
       ```
   
 * When I replace this part in lastest version with old code from v 0.7.24 previews
   of pages works.
 * Old code:
 *     ```
       $originalUrl =  preg_replace( '@/+@', '/', str_replace( trim( strtolower($posts[0]->meta_value),'/' ),
                         ( $posts[0]->post_type == 'page' ?
                             custom_permalinks_original_page_link($posts[0]->ID)
                             : custom_permalinks_original_post_link($posts[0]->ID) ),
                          strtolower($request_noslash) ) );
       ```
   
 * But, also I found out that previews of posts not working with old code.
 * So with version 0.7.24 I can preview pages, but not posts. And in version 0.7.25
   and higher I can preview posts, but not pages.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Permalinks] Latest version does not work with post preview](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/)
 *  [macropolo](https://wordpress.org/support/users/macropolo/)
 * (@macropolo)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/#post-7339017)
 * Hi Sami. I just tried few versions, I replaced custom-permalinks.php without 
   deactivating plugin. When I upload 0.7.24 everything works perfect, but when 
   I upload 0.7.25 or higher previews not working and instead I see 404. Previews
   work with posts in any version, problem appear with page preview and custom post
   type preview.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Permalinks] Latest version does not work with post preview](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/)
 *  [macropolo](https://wordpress.org/support/users/macropolo/)
 * (@macropolo)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/latest-version-does-not-work-with-post-preview/#post-7339007)
 * I confirm, issue exist in 0.7.25, and in my case, it appeared in last version.
   With old versions I didn’t have any problem.

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