Title: Scott Reilly's Replies - page 17 | WordPress.org

---

# Scott Reilly

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 241 through 255 (of 409 total)

[←](https://wordpress.org/support/users/coffee2code/replies/page/16/?output_format=md)
[1](https://wordpress.org/support/users/coffee2code/replies/?output_format=md) [2](https://wordpress.org/support/users/coffee2code/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/coffee2code/replies/page/3/?output_format=md)…
[16](https://wordpress.org/support/users/coffee2code/replies/page/16/?output_format=md)
17 [18](https://wordpress.org/support/users/coffee2code/replies/page/18/?output_format=md)…
[26](https://wordpress.org/support/users/coffee2code/replies/page/26/?output_format=md)
[27](https://wordpress.org/support/users/coffee2code/replies/page/27/?output_format=md)
[28](https://wordpress.org/support/users/coffee2code/replies/page/28/?output_format=md)
[→](https://wordpress.org/support/users/coffee2code/replies/page/18/?output_format=md)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Problem with checked() function](https://wordpress.org/support/topic/problem-with-checked-function/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years ago](https://wordpress.org/support/topic/problem-with-checked-function/#post-2705042)
 * The theme is likely not saving a value for the ‘checkbox’ setting unless it’s
   checked. If a checkbox isn’t checked, it isn’t included in the submitted form.
   If the plugin uses the submitted form directly (without checking for the presence
   of the ‘checkbox’ field and appropriately setting its value to 0 if it isn’t 
   present), then that setting won’t get saved in the settings array. Thus your 
   use of `$options['checkbox']` is referencing an array element that does not exist.
 * You can account for that by modifying you code snippet as such:
 *     ```
       function sunburst_theme_checkbox_input() {
       	$options = get_option( 'sunburst_theme_options' );
       	if ( ! isset( $options['checkbox'] ) )
       		$options['checkbox'] = 0;
       	?> <input id='checkbox' name='sunburst_theme_options[checkbox]' type='checkbox' value='1' <?php checked( $options['checkbox'], 1  ) ; ?> />
       <?php }
       ```
   
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [List of random posts](https://wordpress.org/support/topic/list-of-random-posts/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 1 month ago](https://wordpress.org/support/topic/list-of-random-posts/#post-2640768)
 * [@aassddff](https://wordpress.org/support/users/aassddff/): Your original example
   code is the most straightforward for getting random posts. Depending on the number
   of posts your blog has, you’ll likely not notice the difference between that 
   approach and a more efficient approach.
 * If you want a more efficient approach, however, here’s an variation based on 
   what you had above:
 *     ```
       <ul>
       <?php
       global $wpdb;
       $post_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} WHERE post_status = 'publish' AND post_type = 'post';" );
       shuffle( $post_ids );
       $rand_posts = get_posts( array( 'include' => array_slice( $post_ids, 0, 10 ) ) );
       foreach ( $rand_posts as $p ) : ?>
          <li><a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?></a></li>
       <?php endforeach; ?>
       </ul>
       ```
   
 * This approach obtains all valid post IDs from the database, randomizes them in
   PHP, and selects 10 for use to query for actual posts.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Limits] [Plugin: Custom Post Limits] Front Page Limit doesn't work](https://wordpress.org/support/topic/front-page-limit-doesnt-work/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/front-page-limit-doesnt-work/#post-2127672)
 * Belated follow-up to this, but this ability was added to v3.5 of the plugin.
 * Each section that can have its own custom post limit now also has the ability
   to separately define the front page limit for that section. So your front page
   can show 3 posts, whereas pages 2+ could be set to show 10 each.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Post Limits] [Plugin: Custom Post Limits] Doesn't work on Blog network](https://wordpress.org/support/topic/plugin-custom-post-limits-doesnt-work-on-blog-network/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-custom-post-limits-doesnt-work-on-blog-network/#post-2068648)
 * Belated follow-up on this, but the problem should not be present in more recent
   versions of the plugin (the current latest being v3.6). Let me know if you experience
   otherwise.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Get Custom Field Values] [Plugin: Get Custom Field Values] About sidebar widget](https://wordpress.org/support/topic/plugin-get-custom-field-values-about-sidebar-widget/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-get-custom-field-values-about-sidebar-widget/#post-2541211)
 * Unfortunately the widget does not currently facilitate being as freeform with
   the output of multiple custom fields for a post as is possible when using the
   template tags within template files (as that’s what you seem to be saying you
   currently do).
 * If you’re already using the template tags within a post/page template, you can
   also use them in the sidebar. There are variations of `get_custom()`, such as`
   get_current_custom()` that work in the sidebar template.
 * But I do understand your use case though. I have plans for additional functionality
   that will make doing what you want to do quite easy. No time estimate on when
   it’ll be ready though. Until then it’s either the template tag approach, or multiple
   widgets.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Get Custom Field Values] [Plugin: Get Custom Field Values] About sidebar widget](https://wordpress.org/support/topic/plugin-get-custom-field-values-about-sidebar-widget/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-get-custom-field-values-about-sidebar-widget/#post-2541147)
 * Yes, the widget only retrieves a custom field according to a specific field/key.
   That field can appear multiple times for a post, or in multiple posts. It currently
   does not support retrieving multiple custom field keys in a single widget or 
   request.
 * Could you provide an example use case where you want to get the values for multiple
   custom field keys in a single widget?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Text Hover] [Plugin: Text Hover] Doesn't work with Unicode characters](https://wordpress.org/support/topic/plugin-text-hover-doesnt-work-with-unicode-characters/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-text-hover-doesnt-work-with-unicode-characters/#post-2441257)
 * Could you provide an excerpt of some lines from your text replacement rules so
   that I can test out the replacements you are attempting?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Text Replace] [Plugin: Text Replace] Broken with WP 3.3](https://wordpress.org/support/topic/plugin-text-replace-broken-with-wp-33/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-text-replace-broken-with-wp-33/#post-2471954)
 * Please try v3.2.2 of the plugin and report back whether it’s working any better
   for you or not. If it doesn’t, please provide an example or two of text replacement
   rules you have defined so that I can test them out.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Get Custom Field Values] [Plugin: Get Custom Field Values] Empty widget shows up](https://wordpress.org/support/topic/plugin-get-custom-field-values-empty-widget-shows-up/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-get-custom-field-values-empty-widget-shows-up/#post-2528332)
 * Great suggestion! You can definitely expect to have this in v3.4 of the plugin,
   which should be out soon. Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Category Image(s)] [Plugin: Category Image(s)] Wont let you select an image](https://wordpress.org/support/topic/plugin-category-images-wont-let-you-select-an-image/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-category-images-wont-let-you-select-an-image/#post-2515969)
 * Are you sure you’re posting this issue under the correct plugin? The Category
   Image(s) plugin does not facilitate you adding an image. It assumes you’re already
   able to get the images onto your server into the appropriate locations. (Basically,
   it has no interface and is code-only.)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Get Custom Field Values] [Plugin: Get Custom Field Values] Using quotes](https://wordpress.org/support/topic/plugin-get-custom-field-values-using-quotes/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-get-custom-field-values-using-quotes/#post-2521712)
 * Glad the plugin has been of use to you!
 * As you’ve figured out, quotes that you want to send as part of the value of a
   shortcode attribute (field, before, after, between) need to be encoded. Otherwise,
   the shortcode parser for WP has problems making sense of the shortcode.
 * It’s a good point though, so I’m going to add an explanation to the FAQ to help
   others in the future.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Text Replace] [Plugin: Text Replace] Did not replace shortcut text](https://wordpress.org/support/topic/plugin-text-replace-did-not-replace-shortcut-text/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-text-replace-did-not-replace-shortcut-text/#post-2525342)
 * Do you have the checkbox labeled “Case sensitive text replacement?” checked? 
   It is checked by default.
 * If so, then a replacement rule of:
 * `foo => bar`
 * would not replace “Foo” in the text because of the capital “F”. Try with the 
   checkbox unchecked, or by defining a case specific rule, e.g.
 * `Foo => bar`
 * or try “foo” in your post.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Get Custom Field Values] [Plugin: Get Custom Field Values] order of list](https://wordpress.org/support/topic/plugin-get-custom-field-values-order-of-list/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-get-custom-field-values-order-of-list/#post-2474604)
 * The function `c2c_get_current_custom()` relies on WordPress’s `get_post_custom_values()`
   function. The latter performs a query without specifying an ORDER BY clause in
   the SQL, so the order of the data returned cannot be depended on (as you’ve noticed).
 * Presumably you’d expect/prefer the custom field values to be ordered alphabetically?
 * In thinking about it, it seems like it may be worthwhile for me to allow specifying
   an ‘order’ argument to a few of the functions. In the meantime, there isn’t a
   straightforward solution for you. Depending on where and how you’re using the
   function, you can invoke the output formatting function directly with the sorted
   custom field values.
 * For example, Instead of something like this:
 * `echo c2c_get_current_custom( 'myfield', '', '', '', ', ' );`
 * You’d do:
 *     ```
       $cfvalues =  (array) get_post_custom_values( 'myfield', get_the_ID() );
       sort( $cfvalues );
       echo c2c__format_custom( 'myfield', $cfvalues, '', '', '', ', ' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Text Replace] [Plugin: Text Replace] Textreplace works in posts, but not in lists of posts](https://wordpress.org/support/topic/plugin-text-replace-textreplace-works-in-posts-but-not-in-lists-of-posts/)
 *  Plugin Author [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-text-replace-textreplace-works-in-posts-but-not-in-lists-of-posts/#post-2501685)
 * Two questions:
 * 1. Are you reporting that the plugin worked at that link before and broke recently,
   or it never worked there (assuming you had that post listing before)?
 * 2. How are you generating that post listing? A plugin or a theme template? It
   appears as though it’s outputting a custom excerpt for posts without running 
   filters, thus the plugin can’t act on the text.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: Allow Multiple Accounts] not working after upgrade to WordPress 3.3](https://wordpress.org/support/topic/plugin-allow-multiple-accounts-not-working-after-upgrade-to-wordpress-33/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-allow-multiple-accounts-not-working-after-upgrade-to-wordpress-33/#post-2454029)
 * I see what you’re getting at and can appreciate your desire: essentially being
   able to use WP MS to manage multiple sites via a single installation, but being
   able to have full conceptual separation between the sites (plugins, themes, users,
   etc). Sometimes you want to facilitate running multiple sites instead of a network.
 * That said, WP is geared for the network approach. There are a number of implications
   of allowing duplicate accounts (username + email) (even just username). Supporting
   this is outside the scope of this plugin.
 * I’m not convinced that this is viable with how things are architected now, but
   for that reason (and I like challenges) it’s worth investigating in the future.

Viewing 15 replies - 241 through 255 (of 409 total)

[←](https://wordpress.org/support/users/coffee2code/replies/page/16/?output_format=md)
[1](https://wordpress.org/support/users/coffee2code/replies/?output_format=md) [2](https://wordpress.org/support/users/coffee2code/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/coffee2code/replies/page/3/?output_format=md)…
[16](https://wordpress.org/support/users/coffee2code/replies/page/16/?output_format=md)
17 [18](https://wordpress.org/support/users/coffee2code/replies/page/18/?output_format=md)…
[26](https://wordpress.org/support/users/coffee2code/replies/page/26/?output_format=md)
[27](https://wordpress.org/support/users/coffee2code/replies/page/27/?output_format=md)
[28](https://wordpress.org/support/users/coffee2code/replies/page/28/?output_format=md)
[→](https://wordpress.org/support/users/coffee2code/replies/page/18/?output_format=md)