Title: cbarnett's Replies | WordPress.org

---

# cbarnett

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/users/cbarnett/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/cbarnett/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Display Posts - Easy lists, grids, navigation, and more] Ability to display custom field?](https://wordpress.org/support/topic/ability-to-display-custom-field/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/ability-to-display-custom-field/#post-4736252)
 * Hi geekhero,
    Thank you for sharing this link and sorry for the slow reply.
 * Where do I add this filter? I tried editing the custom field to match my custom
   field (which is “publication”) instead of location, etc, and added this code 
   directly to the php of the main plugin and it forced it to deactivate the plugin
   because of a syntax error so I am obviously doing something wrong. I’m not a 
   developer so I am not well versed in php.
 * Do I need to instead upload it directly to the FTP server under that plugin as
   an additional php file?
 * How do I then with the shortcode call out the custom fields to be displayed? 
   Will they be displayed by default or do I need to do a special parameter ie category
   =”articles” or something of that nature?
 * Basically the name of my custom field is “publication” so would the correct code
   then be:
 *     ```
       <?php
       /**
       * Add custom fields to Display Posts Shortcode
       * @author Bill Erickson
       * @link http://wordpress.org/extend/plugins/display-posts-shortcode/
       * @link http://www.billerickson.net/shortcode-to-display-posts/comment-page-1/#comment-4565
       *
       * @param $output string, the original markup for an individual post
       * @param $atts array, all the attributes passed to the shortcode
       * @param $image string, the image part of the output
       * @param $title string, the title part of the output
       * @param $date string, the date part of the output
       * @param $excerpt string, the excerpt part of the output
       * @return $output string, the modified markup for an individual post
       */
       add_filter( 'display_posts_shortcode_output', 'be_display_posts_custom_fields', 10, 6 );
       function be_display_posts_custom_fields( $output, $atts, $image, $title, $date, $excerpt ) {
   
       // Get our custom fields
       global $post;
       $publication = esc_attr( get_post_meta( $post->ID, 'publication', true ) );
   
       // If there's a value for the custom field, let's wrap them with <span>'s so you can control them with CSS
       if( isset( $publication ) ) $publication = '<span class="location">' . $publication . '</span> ';
   
       // Now let's rebuild the output.
       $output = '<li>' . $image . $title . $publication . $excerpt . '</li>';
   
       // Finally we'll return the modified output
       return $output;
       }
       ```
   
 * Thanks for any additional help you could give. I appreciate it!
 *   Forum: [Reviews](https://wordpress.org/support/forum/reviews/)
    In reply to:
   [[WordPress Related Posts] Great plugin if you want to have related posts by tags display automatically](https://wordpress.org/support/topic/great-plugin-if-you-want-to-have-related-posts-by-tags-display-automatically/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/great-plugin-if-you-want-to-have-related-posts-by-tags-display-automatically/#post-7728025)
 * You’re right, you patched this plugin to now work automatically with qTranslate.
   Thanks so much for your attention and responsiveness.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PHP Browser Detection] How do I set the same property for several browsers?](https://wordpress.org/support/topic/how-do-i-set-the-same-property-for-several-browsers/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-do-i-set-the-same-property-for-several-browsers/#post-3403319)
 * Yes – that worked perfectly! Thanks for your help!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[PHP Browser Detection] How do I set the same property for several browsers?](https://wordpress.org/support/topic/how-do-i-set-the-same-property-for-several-browsers/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/how-do-i-set-the-same-property-for-several-browsers/#post-3402975)
 * And just a note those are codes for slideshows – I want it to play one slide 
   show for some browsers (without animated GIFs because IE and Chrome both have
   trouble playing them) and another slideshow for all other browsers (with animated
   GIFs).
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Relevanssi - A Better Search] Relevance is way off](https://wordpress.org/support/topic/relevance-is-way-off/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/relevance-is-way-off/#post-3394137)
 * Also, forgot to mention, certain posts “stick” they are in the top 3 results 
   inexplicably no matter what I’m searching and have nothing to do with the terms
   searched in most cases including no tags and no categories matching…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: qTranslate] Cannot add/update multilanguage text widget!](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/#post-3336846)
 * I think your problem is you are selecting the regular qTranslate – This fix is
   to be applied to a plugin called **“qTranslate extension”** which is a _separate_
   plugin from regular qTranslate here:
    [http://wordpress.org/extend/plugins/qtranslate-extended/](http://wordpress.org/extend/plugins/qtranslate-extended/)
   This is the plugin that gives you the Multilanguage Text Widget – qTranslate 
   on it’s own does not come with a widget. So if you don’t have qTranslate extension
   installed already, your problem might be something else. This issue is specific
   to the multilanguage text widget of the qTranslate _extension_ plugin.
 * Hope this helps clarify.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Display Posts - Easy lists, grids, navigation, and more] Trying to show excerpts only, but in absence of excerpt, content text appears](https://wordpress.org/support/topic/trying-to-show-excerpts-only-but-in-absence-of-excerpt-content-text-appears/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/trying-to-show-excerpts-only-but-in-absence-of-excerpt-content-text-appears/#post-3374785)
 * Okay. So, if I understand right, if I take out the include_excerpt parameter 
   completely it will eliminate all instances of the excerpt OR content getting 
   pulled in, right? I think if this is the case we probably will just use the parameter
   when we have a solid excerpt in place.
 * Any ideas why even though many of my posts have no excerpt they aren’t showing
   even the content getting pulled in? As I mentioned in my first post, it seemed
   to be happening randomly – either showing content or nothing when the excerpt
   parameter was set to true and there was no excerpt specified for the post.
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: qTranslate] Cannot add/update multilanguage text widget!](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/#post-3336834)
 * To open the **qtranslate-extended.php** file, go to Plugins in the WordPress 
   dashboard of your website, then navigate to “Editor.”
 * To the right top side, there should be a drop down list of all the plugins you
   have installed. Select **“qTranslate Extension”** and it brings up a list of 
   the php files for the plugin. Open the** qtranslate-extended.php** file, and 
   in the Editor box, you will see all the code.
 * For editing, I copied all of the code (Ctrl+A then Ctrl+C) and pasted it into
   DreamWeaver in a blank PHP file, to find the correct lines where to insert the
   fix. (lines 202 to 210) Since I changed my original php file already I’m not 
   sure what the original code was before the replacement.
 * After copying in the code pasted above by **minhtam72 **over these code lines,
   you can simply copy and paste all of the code from DreamWeaver back in, REPLACING
   the old code in the Editor code box.
 * Click “Save” or “Update Plugin” and you’ve applied the fix!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: qTranslate] Cannot add/update multilanguage text widget!](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-qtranslate-cannot-addupdate-multilanguage-text-widget/#post-3336823)
 * Thank you, that fixed it for me. It was deleting my text fields when I tried 
   to create a new Multilanguage Text Widget (enabled by the qTranslate extension
   plugin.) You rock, minhtam72!!!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Related Posts] No related posts to show](https://wordpress.org/support/topic/no-related-posts-to-show/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/no-related-posts-to-show/#post-3314761)
 * Hi, we ran into this problem too. We didn’t want any random posts showing up 
   on certain posts so we did the fix you suggested on a different support thread
   here to take it back to the old days and just use tags for relevance so we would
   have complete control of related posts showing up.
 * So, this leaves us with a blank “Read More” section at the bottom of posts with
   no tags. For this reason, it would be nice to have a check bo under settings 
   that you can hit when “If no related posts, hide title “Read More”” or something
   of that nature.
 * And also check boxes where you can pick exactly what it uses for relevance – 
   tags, categories, or random, etc would be nice! Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[qTranslate] qTranslate broken after update WP to 3.5 version](https://wordpress.org/support/topic/qtranslate-broken-after-update-wp-to-35-version/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/qtranslate-broken-after-update-wp-to-35-version/page/3/#post-3268013)
 * Thanks to nikolov and felix for investigating these steps and doing the research.
   I implemented the fixes they suggested in the forum (copied again below) **and
   was successful for my site on version 3.5**
 * 1- change `define('QT_SUPPORTED_WP_VERSION', '3.4.2');`
    to `define('QT_SUPPORTED_WP_VERSION','
   3.5');`
 * 2- Use this code for **qtranslate_javascript.php**: [here](http://pastebin.com/DCWLHqPG#myform)
 * 3 – add this code into your **functions.php**
    `add_filter( 'wp_default_editor',
   create_function('', 'return "html";') );`
 * You guys rock in Qian Qin’s absence for helping with this. I suggest we donate
   to help support and encourage Qian and his continued development of this plugin
   which has been perfect for my needs.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Related Posts] How the relevance is defined?](https://wordpress.org/support/topic/how-the-relevance-is-defined/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/how-the-relevance-is-defined/#post-3326188)
 * This is disappointing, we originally used this Plugin because we liked to show
   related posts based ONLY on Tags – now it is generating undesirable related posts
   based on categories or something on our website where we do not want them to 
   appear.
 * Is there any chance in the future that we can turn off the option to use title,
   category, etc other than tags? We really like this plugin but now the functionality
   is marred for the way we have been using it because now it has changed the way
   all our related posts appear…
 * Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WordPress Related Posts] [Plugin: WordPress Related Posts] conflict with qtranslate plugin?](https://wordpress.org/support/topic/plugin-wordpress-related-posts-conflict-with-qtranslate-plugin/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wordpress-related-posts-conflict-with-qtranslate-plugin/#post-2591963)
 * I am happy to see you included the qTranslate compatibility with the newest version–
   and it indeed seems to be working as it should! Thank you!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Wordpress Random Image] Hyperlink images](https://wordpress.org/support/topic/hyperlink-images-1/)
 *  [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/hyperlink-images-1/#post-3163204)
 * I’m also interested in knowing the possibility of this option (adding a URL /
   hyperlink to an image in this shortcode). Any answers anyone?
 * Thank you.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Information Reel] Add to places other than widget area?](https://wordpress.org/support/topic/add-to-places-other-than-widget-area/)
 *  Thread Starter [cbarnett](https://wordpress.org/support/users/cbarnett/)
 * (@cbarnett)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/add-to-places-other-than-widget-area/#post-3245509)
 * Thanks, toddhalfpenny, I’ll give it a try.

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/users/cbarnett/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/cbarnett/replies/page/2/?output_format=md)