Title: Scott Reilly's Replies - page 23 | 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 - 331 through 345 (of 409 total)

[←](https://wordpress.org/support/users/coffee2code/replies/page/22/?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)…
[22](https://wordpress.org/support/users/coffee2code/replies/page/22/?output_format=md)
23 [24](https://wordpress.org/support/users/coffee2code/replies/page/24/?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/24/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Using custom field to display images in post](https://wordpress.org/support/topic/using-custom-field-to-display-images-in-post/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [16 years, 8 months ago](https://wordpress.org/support/topic/using-custom-field-to-display-images-in-post/#post-1202342)
 * You can’t have a dash as part of a variable’s name. Change `$sample-image` to`
   $sample_image`. Looks like you have to do that in three places.
 * Also, your one line of code would be better as:
 * `<?php $sample_image = get_post_meta(the_ID(), 'sample-image', true); ?>`
 * What you are doing above is actually one of the reasons why I originally wrote
   the [Get Custom Field Values](http://wordpress.org/extend/plugins/get-custom-field-values/)
   plugin. All this code of yours:
 *     ```
       <?php $sample-image = get_post_meta($post->ID, 'sample-image', $single = true); ?>
       			<div id="sample-image">
   
       				<?php // if there's a thumbnail
       				if($sample-image !== '') { ?>
       					<p>
       						<img src="<?php echo $sample-image; ?>" />
       					</p>
       				<?php } ?>
       			</div>
       ```
   
 * would just be this with the plugin:
 *     ```
       <div id='sample-image'>
          <?php echo c2c_get_custom('sample-image', '<p><img src="', '" /></p>'); ?>
          </div>
       ```
   
 * (You could put the div tags in the call to the function too so that the sample-
   image div also doesn’t display if there is no sample image. But the way your 
   original is coded, the div will always display, so my c2c_get_custom example 
   behaves that same way.)
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [Custom Fields = 0 ? how to?!](https://wordpress.org/support/topic/custom-fields-0-how-to/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [17 years, 7 months ago](https://wordpress.org/support/topic/custom-fields-0-how-to/#post-857741)
 * The fourth argument determines what to show if a post doesn’t have the custom
   field you’re looking for.
 * For example:
    `<img src="/wp-content/uploads/<?php echo c2c_get_custom("screenshot","","","
   default_screenshot.jpg"); ?>" />`
 * The above code looks for the custom field “screenshot” and returns that; otherwise
   it’ll return the value “default_screenshot.jpg”. Of course, customize to suit
   your needs.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Creating Custom RSS Feed](https://wordpress.org/support/topic/creating-custom-rss-feed/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [17 years, 8 months ago](https://wordpress.org/support/topic/creating-custom-rss-feed/#post-857029)
 * WordPress will create custom feeds on-the-fly for you if you provide additional
   query arguments:
 *     ```
       <a href="http://yoursite.com/feed/?cat=3,7,8,11">Feed 2</a>
   
       <a href="http://yoursite.com/feed/?cat=1,2,3,7,10">Feed 3</a>
       ```
   
 * Obviously, modify the domain to match the root of your WP site (which, if running
   in a subdirectory, should also be included: i.e. `http://your-real-domain.com/
   wordpress/feed/`).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Exclude Specified Posts from Homepage](https://wordpress.org/support/topic/exclude-specified-posts-from-homepage/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [18 years ago](https://wordpress.org/support/topic/exclude-specified-posts-from-homepage/#post-749110)
 * You can try out [Stealth Publish](http://coffee2code.com/wp-plugins/stealth-publish/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Recent posts](https://wordpress.org/support/topic/recent-posts-5/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [19 years, 6 months ago](https://wordpress.org/support/topic/recent-posts-5/#post-469404)
 * By default the plugin outputs each listed post within `<li></li>` tags. So you
   need something like:
 * `Recent Posts
    <ul> <?php c2c_get_recent_posts(3); ?> </ul>
 * Or define your own format via the function’s second argument (read the docs for
   this on the abovementioned page).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Find Category ID of post, see if it equals 20, then do something](https://wordpress.org/support/topic/find-category-id-of-post-see-if-it-equals-20-then-do-something/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [20 years, 8 months ago](https://wordpress.org/support/topic/find-category-id-of-post-see-if-it-equals-20-then-do-something/#post-253903)
 * Try:
 * `<?php if ( in_category(20) ) { ?>
    <p>DO SOMETHING</p> <?php } else { ?> <p>
   DO SOMETHING ELSE</p> <?php } ?>
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Problem with listing users in sidebar.](https://wordpress.org/support/topic/problem-with-listing-users-in-sidebar/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [20 years, 8 months ago](https://wordpress.org/support/topic/problem-with-listing-users-in-sidebar/#post-253888)
 * Ok, do these also:
 * 1. Remove this line:
    `echo "<li>";`
 * 2. Change this line (near the very end of file):
 * `echo "$link</li>n";`
 * to this:
 * `echo "<li>$link</li>n";`
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Problem with listing users in sidebar.](https://wordpress.org/support/topic/problem-with-listing-users-in-sidebar/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [20 years, 8 months ago](https://wordpress.org/support/topic/problem-with-listing-users-in-sidebar/#post-253865)
 * **jorgent**: Try this: On line 215 of the plugin replace the line:
 * `else return;`
 * with
 * `else continue;`
 * (There is only one `else return;` line in the file.)
 * See if that works for you and let me know. I’ll keep your user level exclusion
   idea in mind for the next version of the plugin (which if you confirm the above
   fix may be somewhat soonish).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Viewing a custom field in Manage Posts layout](https://wordpress.org/support/topic/viewing-a-custom-field-in-manage-posts-layout/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [20 years, 9 months ago](https://wordpress.org/support/topic/viewing-a-custom-field-in-manage-posts-layout/#post-239851)
 * I had written a plugin (heretofore unreleased) that allows you to do the above.
   I make no guarentees about it, but last I remember it worked. You can download
   the zip of it [here](http://www.coffee2code.com/wp-plugins/meta-in-admin-posts-listing.zip).
   You can see the code for it [here](http://www.coffee2code.com/wp-plugins/meta-in-admin-posts-listing.phps).
 * Just unzip the .zip in your wp-content/plugins/ directory. Then edit it to identify(
   a) the custom fields you want to add to the “Manage Posts” page, and (b) the 
   existing columns you want removed. Sorry, no admin screen for it at the moment.
 * For example, using what you said, to add custom field to post listing, edit this
   variable like so:
    `$custom_fields_to_show_in_listing = array( 'country_name'
   => 'Country', );
 * To remove existing columns (such as the author and category columns), change 
   this relevent section:
    `$listing_columns_to_remove = array('author', 'categories');`
 * Remember, you’re editing the plugin file to add/change the above code, not your
   templates or WP core files.
 * Then, of course, activate the plugin.
 * If you try it, let me know how (if) it works.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Problems with Customizable Post Listings Plugin](https://wordpress.org/support/topic/problems-with-customizable-post-listings-plugin/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [20 years, 10 months ago](https://wordpress.org/support/topic/problems-with-customizable-post-listings-plugin/#post-230252)
 * You’re calling the plugin from within “the loop”. Basically in the above you’re
   telling it to list the 20 most recent posts, doing so once for every post you
   have WP set to list (probably 10, as you mentioned the recent posts listings 
   as being repeated 10 times). If you really want to use the above setup, don’t
   include the post loop:
 * `<?php if (have_posts()) : ?>`
 * <div class="post">
 *  Recent Posts
    <?php c2c_get_recent_posts(20); ?>
 * </div>
 * <?php else: ?>
    <?php _e('Sorry, dat konden we niet vinden!'); ?> <?php endif;?
   >
 * However, since you aren’t defining any customizations to the function call, you
   probably just want to use regular WP [template tags](http://codex.wordpress.org/Stepping_Into_Template_Tags).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Exhibit install error: Call to undefined function: get_currentuserinfo()](https://wordpress.org/support/topic/exhibit-install-error-call-to-undefined-function-get_currentuserinfo/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [21 years ago](https://wordpress.org/support/topic/exhibit-install-error-call-to-undefined-function-get_currentuserinfo/#post-200669)
 * `get_currentuserinfo()` is a replacable function, hence its inclusion in the 
   pluggable-functions.php file. As such, the function needs to load AFTER all the
   plugins have been loaded (unlike in pre-1.5.1 versions where it got loaded BEFORE
   plugins).
 * What this means for plugins is that you can’t call on `get_currentuserinfo()`
   in global space. I haven’t taken a look at the code for Exhibit, but that is 
   my guess as to what it’s doing and why it’s now a problem.
 * It’s very likely other plugins will be likewise affected.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [XHTML validating & the <!–more–> tag](https://wordpress.org/support/topic/xhtml-validating-038-the-lt-more-gt-tag/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [21 years ago](https://wordpress.org/support/topic/xhtml-validating-038-the-lt-more-gt-tag/#post-197362)
 * There is a bug report on Mosquito related to this issue (which isn’t limited 
   to just the `<blockquote>` tag: [http://mosquito.wordpress.org/view.php?id=178](http://mosquito.wordpress.org/view.php?id=178)
 * The patch attached to that bug may not apply so cleanly as it was created months
   ago and the WP code has probably changed things up a bit since then, but the 
   approach should still be valid.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [Help with wp-phpmailer](https://wordpress.org/support/topic/help-with-wp-phpmailer/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [21 years ago](https://wordpress.org/support/topic/help-with-wp-phpmailer/#post-194900)
 * Would your server also be a Windows server?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [C2C Posts Plugin – How to truncate Permalink?](https://wordpress.org/support/topic/c2c-posts-plugin-how-to-truncate-permalink/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [21 years ago](https://wordpress.org/support/topic/c2c-posts-plugin-how-to-truncate-permalink/#post-194157)
 * I assume by %URL% you meant %post_URL%. Well, I’m close to releasing a much-delayed
   update to the plugin. I could probably add a setting or two to allow truncation
   of titles. Would you be looking to truncate by word or number of characters? 
   A good solution might be to allow truncation of any of the percent-substitution
   tag values. Hmm, I may just get this version out the door before I try that. 
   There are enough new features in it as it is… 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [wpPHPMailer has me confused](https://wordpress.org/support/topic/wpphpmailer-has-me-confused/)
 *  [Scott Reilly](https://wordpress.org/support/users/coffee2code/)
 * (@coffee2code)
 * WordPress & Plugin Developer
 * [21 years ago](https://wordpress.org/support/topic/wpphpmailer-has-me-confused/#post-194611)
 * Don’t reinstall WP on account of the plugin. Permissions might be set incorrectly
   for the plugin’s file(s) and/or directory. Do you have shell access to your plugin’s
   directory? If so, can you check owner and file permissions? What operating system
   is your server and what web server are they using?

Viewing 15 replies - 331 through 345 (of 409 total)

[←](https://wordpress.org/support/users/coffee2code/replies/page/22/?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)…
[22](https://wordpress.org/support/users/coffee2code/replies/page/22/?output_format=md)
23 [24](https://wordpress.org/support/users/coffee2code/replies/page/24/?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/24/?output_format=md)