end of post junk

Best WordPress theme for game news websites, game portals or whatever your preferred subject.
GK User
Mon Sep 17, 2012 8:51 am
(1)When viewing a regular post using this theme, at the end of the post I will see:
WPS post link:0
dsq_thread_id:821872986

When viewing the post in another theme (Twenty Eleven) I see:
This entry was posted in Guild News by admin. Bookmark the permalink.

What is this (1) and how do I make it go away? I looked for about an hour but just can't figure it out.

Thank you
V-
User avatar
Fresh Boarder

GK User
Mon Sep 17, 2012 1:34 pm
Probably it is a display of the Post Custom Fields. Are you using some 3rd party plugins which stores information in the Posts meta data? Probably these plugins stores the data in the non-protected post meta data fields.
User avatar
Administrator

GK User
Mon Sep 17, 2012 7:03 pm
Thanks for responding...Unfortunately, I wouldn't know where to look for non-protected post meta data fields. Well, i spent forever trying to figure this out and here's what I conclude... I am using WPSymposium and FeedWordpress which when either is activated, any new post will show that junk at the bottom of the post. but in any other template I use (other than those from this site*), it does not and remains clear. Obviously I'd prefer to use this template so any fix/advice would be nice.


*I downloaded and tried the free WP template from this site and it does the same thing, added junk at the bottom.

Thank you
V-
User avatar
Fresh Boarder

GK User
Mon Sep 17, 2012 7:21 pm
In general it seems to be a bug in these extensions, because probably in all themes which supports the Custom Post Fields these values will be visible. To remove it please in the file gavern/helpers/helpers.layout.fragments.php replace function gk_post_fields to:
Code: Select all

function gk_post_fields() {
   global $tpl;
   // get the post custom fields
   /*if ($keys = get_post_custom_keys()) {
      // variable for the list items
      $output = '';
      // generate the list
      foreach ((array) $keys as $key) {
         // trim the key name
         $key_trimmed = trim($key);
         // skip the protected meta data and "gavern-" values
         if(is_protected_meta($key_trimmed, 'post') || stripos($key_trimmed, 'gavern-') !== FALSE) {
            continue;
         }
         // map the values
         $values = array_map('trim', get_post_custom_values($key));
         // extract the value
         $value = implode($values,', ');
         // generate the item
         $output .= apply_filters('the_meta_key', '<dt>'.$key.':</dt>'."\n".'<dd>'.$value.'</dd>'."\n", $key, $value);
      }
      // output the list
      if($output !== '') {
         echo '<dl class="post-fields">' . "\n";
         echo $output;
         echo '</dl>' . "\n";
      }
   }*/
}
User avatar
Administrator

GK User
Mon Sep 17, 2012 9:10 pm
THANK YOU SIR! Looks all pretty now :)
User avatar
Fresh Boarder

GK User
Tue Sep 18, 2012 9:04 am
In the future version we will add an option to directly disable the custom post fields to avoid code changes in similar cases :)
User avatar
Administrator

GK User
Sun Dec 16, 2012 7:04 pm
Hello,

Maybe I have got the same problem. At the end of one of my posts, I can read this:


gavern_opengraph_desc:
post_views_count:
0

I don't know what to do to remove it.

Czy możesz pomóc?
User avatar
Senior Boarder

GK User
Sun Dec 16, 2012 11:05 pm
Please apply the fix from this commit: https://github.com/GavickPro/Meet-Gaver ... 5cb1f641a4 then you will be able to hide specific fields in the custom post fields ;)
User avatar
Administrator

GK User
Mon Dec 31, 2012 1:17 pm
dziudek wrote:Please apply the fix from this commit: https://github.com/GavickPro/Meet-Gaver ... 5cb1f641a4 then you will be able to hide specific fields in the custom post fields ;)


Finally, it is ALL OK here. :) Please note that the code you inserted to this thread is different from the code you have in the file linked. If I apply the code in the file linked, it does not work, if I apply the embedded code from the forum, it is OK.
User avatar
Senior Boarder

GK User
Mon Dec 31, 2012 1:33 pm
The code from the mentioned file needs additional configuration to create a blacklist in the theme settings ;)
User avatar
Administrator


cron