Title: starting_with not work
Last modified: January 3, 2018

---

# starting_with not work

 *  Resolved [spikketto](https://wordpress.org/support/users/spikketto/)
 * (@spikketto)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/starting_with-not-work/)
 * I’vea big problem with plugin. I try the plugin in localhost and, after editing
   in the file: lcp-parameters.php
 * “public function starting_with ($ where) {
        $ letters = explode (‘,’, $ this-
   > starting_with);     $ where. = ‘AND (wp_posts.post_title’. // ‘COLLATES UTF8_GENERAL_CI
   LIKE \’ ‘. $ letters [0]. “% ‘”;        ‘LIKE \’ ‘. $ letters [0]. “% ‘”;    
   for ($ i = 1; $ i <sizeof ($ letters); $ i ++) {       $ where. = ‘OR wp_posts.
   post_title’. // ‘COLLATES UTF8_GENERAL_CI LIKE \’ ‘. $ letters [$ i]. “% ‘”; ‘
   LIKE \’ ‘. $ letters [$ i]. “% ‘”;     } ”
 * The plugin works correctly. My problem is this. I copied the page code from localhost
   to the website and the plugin does not seem to work.
 * If I write:
    [catlist taxonomy = ‘genres’ terms = ’emerging’] The plugin works
   but if I insert it inside a ul <ul id = “multi”> <span style = “font-size: 12pt;
   font-family: ‘times new roman’, times, serif;”> [catlist taxonomy = ‘genres’ 
   terms = ’emerging’] </ Ul> Does not work
 * If instead I write
    [catlist taxonomy = ‘genres’ terms = ’emerging’ starting_with
   = “a”] The plugin does not work
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fstarting_with-not-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/starting_with-not-work/#post-9854331)
 * You are right [@spikketto](https://wordpress.org/support/users/spikketto/), `
   starting_with` doesn’t work on some servers. This is because of [this](https://make.wordpress.org/core/2015/04/02/the-utf8mb4-upgrade/)
   upgrade in WordPress core. We should make the plugin compatible with utf8mb4.
 * [@fernandobt](https://wordpress.org/support/users/fernandobt/) I think we should
   change the `starting_with` method in `lcp-parameters.php` so that it checks if
   the tables are `utf8` or `utf8mb4` and then use `COLLATE UTF8_GENERAL_CI` or `
   COLLATE UTF8MB4_GENERAL_CI` respectively.
 * This is the error message I get when using [catlist starting_with=”a”] with utf8mb4
   database tables:
 *     ```
       WordPress database error: [COLLATION 'UTF8_GENERAL_CI' is not valid for CHARACTER SET 'utf8mb4']
       SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'post' AND ((wp_posts.post_status = 'publish' OR wp_posts.post_status = 'private'))AND (wp_posts.post_title COLLATE UTF8_GENERAL_CI LIKE 'a%') ORDER BY wp_posts.post_date DESC LIMIT 0, 10
       ```
   
    -  This reply was modified 8 years, 4 months ago by [zymeth25](https://wordpress.org/support/users/zymeth25/).
    -  This reply was modified 8 years, 4 months ago by [zymeth25](https://wordpress.org/support/users/zymeth25/).
 *  [LordDunvegan](https://wordpress.org/support/users/lorddunvegan/)
 * (@lorddunvegan)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/starting_with-not-work/#post-9960165)
 * I also have this problem and with other parameters too. Is it anywhere near being
   resolved, please?
 * Thanks
 * Richard
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/starting_with-not-work/#post-9960531)
 * [@lorddunvegan](https://wordpress.org/support/users/lorddunvegan/) It is near
   to being resolved. If you are interested, the fix is [here](https://github.com/picandocodigo/List-Category-Posts/pull/289).
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/starting_with-not-work/#post-10103659)
 * Fixed in v0.76

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

The topic ‘starting_with not work’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/starting_with-not-work/#post-10103659)
 * Status: resolved