Title: Frederik Liljefred. M.D.'s Replies | WordPress.org

---

# Frederik Liljefred. M.D.

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

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

 Search replies:

## Forum Replies Created

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

1 [2](https://wordpress.org/support/users/frold/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/frold/replies/page/3/?output_format=md) …
[12](https://wordpress.org/support/users/frold/replies/page/12/?output_format=md)
[13](https://wordpress.org/support/users/frold/replies/page/13/?output_format=md)
[14](https://wordpress.org/support/users/frold/replies/page/14/?output_format=md)
[→](https://wordpress.org/support/users/frold/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Redirection] Redirect to subdomain](https://wordpress.org/support/topic/redirect-to-subdomain/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/redirect-to-subdomain/#post-12092314)
 * Did set
 * source url: /t/(.*)
 * target url: new_site/t/$1
 * Set a cross in Regex
 * It seems to work.
    -  This reply was modified 6 years, 8 months ago by [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/).
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Help to continue my discontinued plugin – the array stuff, how to?](https://wordpress.org/support/topic/help-to-continue-my-discontinued-plugin-the-array-stuff-how-to/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/help-to-continue-my-discontinued-plugin-the-array-stuff-how-to/#post-10533376)
 * I was able to get this:
 * **[‘2′,’8000’],[‘4′,’8000′],[’12’,’8500′],[’14’,’10000′],[’15’,’9990′],[’18’,’
   9000′],[’21’,’10000′],[’22’,’10680′],[’24’,’8500′],[’28’,’6000′],**
 * by using
 *     ```
       foreach ( $dbdata as $value )
       {
          echo '[';
          echo '\''.$value->Day.'\',';
          echo '\''.$value->Distance.'\'';
          echo '],';
       }
       ```
   
 * But the output needs to be:
 * **[‘Day’, ‘Distance’], [‘2’, 8000], [‘4′, 8000], [’12’, 8500], [’14’, 10000],[’
   15’, 9990], [’18’, 9000], [’21’, 10000], [’22’, 10680], [’24’, 8500], [’28’, 
   6000]**
 * and stored as `$content`
 * I hope you can help 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Does this work on 4.3.x?](https://wordpress.org/support/topic/does-this-work-on-43x/)
 *  [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/does-this-work-on-43x/#post-6757095)
 * It works on my site: [http://bevarlaegevagten.dk/anmeld/](http://bevarlaegevagten.dk/anmeld/)
 * But stil Rich Snippet Rating doesnt work: [https://developers.google.com/structured-data/rich-snippets/reviews](https://developers.google.com/structured-data/rich-snippets/reviews)
 * If you are able to solve that, then please share!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet rating doesnt seems to work](https://wordpress.org/support/topic/rich-snippet-rating-doesnt-seems-to-work/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/rich-snippet-rating-doesnt-seems-to-work/#post-4594212)
 * Can you confirm it is an issue or is it working on other pages using DD-rating?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet rating doesnt seems to work](https://wordpress.org/support/topic/rich-snippet-rating-doesnt-seems-to-work/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/rich-snippet-rating-doesnt-seems-to-work/#post-4594178)
 * Cool, hope you can spot the reason!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] The hoi bug](https://wordpress.org/support/topic/the-hoi-bug/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/the-hoi-bug/#post-4459752)
 * Thanks,
 * This plugin is better and better Im a happy user at
 * [http://www.bevarlaegevagten.dk](http://www.bevarlaegevagten.dk)
 * Thanks!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384593)
 * Good point…
 * Thanks
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384572)
 * Eg. use this snippet instead to get title support
 *     ```
       $averageOutput .= '
                    <li class="clearfix">
                       <div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
                           <div class="starTitle"><span itemprop="itemreviewed">' . $rateTitle . '</span></div>
                           <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '">
                               <div class="star star-rating" style="width: ' . $itemPercent . '%"></div>
                           </div>
                           <div class= "textParticipants">
                               <div class="number"><span itemprop="votes">' . $itemParticipants . '</span></div>
                               <div class="icon"></div>
                           </div>
                           <div class="textAverage">
                               <span class="comment-count">
                               <span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating">
                               <span itemprop="average">' . number_format(($itemPercent/20), 2, '.', '') . '</span>
                               stars out of
                               <span itemprop="best">5</span>
                               <meta itemprop="worst" content="1"/>
                               </span>
                               </span>
                           </div>
                       </div>
                   </li>';
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384571)
 * To get rich snippet support like here: [http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2F18-13.dk%2Funcategorized%2Ftest-dd-rating](http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2F18-13.dk%2Funcategorized%2Ftest-dd-rating)
 * Open /inc/shortcode.php
 * FIND (about line 132)
 *     ```
       $averageOutput .= '
                    <li class="clearfix">
                       <div class="starTitle">' . $rateTitle . '</div>
                        <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '">
                           <div class="star star-rating" style="width: ' . $itemPercent . '%"></div>
                       </div>
                       <div class= "textParticipants">
                           <div class="number">' . $itemParticipants . '</div>
                               <div class="icon"></div>
                           </div>
                       <div class="textAverage">
                          <span class="comment-count">' . number_format($itemPercent, 2, '.', '') . '%</span>
                       </div>
                   </li>';
       ```
   
 * REPLACE WITH
 *     ```
       $averageOutput .= '
                    <li class="clearfix">
                       <div itemscope itemtype="http://data-vocabulary.org/Review-aggregate">
                           <div class="starTitle">' . $rateTitle . '</div>
                           <div class="star-holder star' . $rateRank . '" title="average:' . $itemPercent . '% participants:' . $itemParticipants . '">
                               <div class="star star-rating" style="width: ' . $itemPercent . '%"></div>
                           </div>
                           <div class= "textParticipants">
                               <div class="number"><span itemprop="votes">' . $itemParticipants . '</span></div>
                               <div class="icon"></div>
                           </div>
                           <div class="textAverage">
                               <span class="comment-count">
                               <span itemprop="rating" itemscope itemtype="http://data-vocabulary.org/Rating">
                               <span itemprop="average">' . number_format(($itemPercent/20), 2, '.', '') . '</span>
                               stars out of
                               <span itemprop="best">5</span>
                               <meta itemprop="worst" content="1"/>
                               </span>
                               </span>
                           </div>
                       </div>
                   </li>';
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384570)
 * (I did upgrade: [http://18-13.dk/uncategorized/test-dd-rating/](http://18-13.dk/uncategorized/test-dd-rating/)–
   to see the images live)
 * I did recode the dd-rating.php file to this
 *     ```
       < ?php
       /*
       Plugin Name: DD_Ratings
       Version: 1.1
       Plugin URI: http://dijkstradesign.com
       Description: A plug-in to add rating-functionality to comments
       Author: Wouter Dijkstra
       Author URI: http://dijkstradesign.com
       */
   
       /*  Copyright 2013  WOUTER DIJKSTRA  (email : info@dijkstradesign.nl)
   
           This program is free software; you can redistribute it and/or modify
           it under the terms of the GNU General Public License, version 2, as
           published by the Free Software Foundation.
   
           This program is distributed in the hope that it will be useful,
           but WITHOUT ANY WARRANTY; without even the implied warranty of
           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
           GNU General Public License for more details.
   
           You should have received a copy of the GNU General Public License
           along with this program; if not, write to the Free Software
           Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       */
       require_once('inc/functions.php');
   
       require_once('inc/add_to_admin_comments.php');
       require_once('inc/add_to_admin_posts.php');
       require_once('inc/add_to_comment.php');
       require_once('inc/add_to_comment_form.php');
   
       require_once('inc/shortcode.php');
   
       /**
       *   Enqueue plugin style-file (CSS) and js file for frontend
       */
       function dd_add_files_to_body_tag()
       {
           wp_register_style( 'dd_css_style_to_body_tag', plugins_url('/css/style.css', __FILE__) );
           wp_enqueue_style( 'dd_css_style_to_body_tag' );
           wp_enqueue_script( 'dd_js_file_to_body_tag', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' );
       }
       add_action( 'wp_enqueue_scripts', 'dd_add_files_to_body_tag' );
   
       /**
       *   Enqueue plugin style-file for backend
       */
       function dd_add_style_to_backend()
       {
          wp_register_style( 'dd_css_style_to_backend', plugins_url('/css/style.css', __FILE__) );
          wp_enqueue_style( 'dd_css_style_to_backend' );
          wp_enqueue_script( 'dd_js_file_to_backend', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' );
   
       }
       add_action( 'admin_init', 'dd_add_style_to_backend' );
       ```
   
 * And it did solve a lot.
 * Now it look like this in the backend
 * For comments
    [Screendump](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-12-kl.-09.44.45.png)
 * For setting in a post
    [Screendump](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-12-kl.-09.45.29.png)
 * In frontend for a post where the averagetag
    `[averageRating]` gives [Screendump](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-12-kl.-09.55.47.png)
 * When you see the list of all post it look like this
    [Screendump](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-12-kl.-09.59.04.png)
 * But there is still an issue with the rating box in the comment area where it 
   look like this
    [Screendump](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-12-kl.-09.57.26.png)
 * I dont know why you see the Json box?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384569)
 * To call the files to be used in the backend use something like
 *     ```
       /**
       *   Enqueue plugin style-file for backend
       */
       function dd_add_style_to_backend()
       {
           wp_register_style( 'dd_css_style_to_backend', plugins_url('/path/filename.css', __FILE__) );
           wp_enqueue_style( 'dd_css_style_to_backend' );
       }
       add_action( 'admin_init', 'dd_add_style_to_backend' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384568)
 * Thanks for a quick reply!
 * Well, I dont think it is a permission issue.
 * Ahh it seem like you call the files the wrong way.
 * Eg try to use this code instead in the dd_rating.php
 *     ```
       /**
       *   Enqueue plugin style-file (CSS) and js file for frontend
       */
       function dd_add_files_to_body_tag()
       {
           wp_register_style( 'dd_css_style_to_body_tag', plugins_url('/css/style.css', __FILE__) );
           wp_enqueue_style( 'dd_css_style_to_body_tag' );
           wp_enqueue_script( 'dd_js_file_to_body_tag', plugins_url( '/js/default.js', __FILE__ ) , array( 'jquery' ), '' );
       }
       add_action( 'wp_enqueue_scripts', 'dd_add_files_to_body_tag' );
       ```
   
 * It did solve some of it:
 * Take a look at: [http://18-13.dk/uncategorized/test-dd-rating/](http://18-13.dk/uncategorized/test-dd-rating/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384566)
 * and when a user may add a comment the comment field look like this
 * [Screendump 4](http://18-13.dk/wp-content/uploads/2011/12/Skærmbillede-2013-12-11-kl.-21.55.47.png)
 * Eg. see: [http://18-13.dk/uncategorized/test-dd-rating/](http://18-13.dk/uncategorized/test-dd-rating/)(
   I did set the creation date to 2 years ago – this way it will not spoil my blog.
   I will delete the post when you have seen it)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[DD Rating] Rich Snippet support and shortcode question](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/rich-snippet-support-and-shortcode-question/#post-4384565)
 * Hey,
 * Im sorry if I was too fast to say this was not working.
 * But I did try many things and it would not work
 * **Setup**:
    Latest WP 3.7.1
 * **Plugins:**
    BackUpWordPress Google Analytics Dashboard for WP Google Doc Embedder
   Google XML Sitemaps upPrev User Submitted Posts WP-Optimize WTI Like Post
 * **Theme:**
    [Meet Gavern](https://www.gavick.com/wordpress-themes/meet-gavernwp,97.html)
 * Let me give you some details.
 * When I make a new post I get this metabox when creating a new post:
 * [Screendump 1](http://18-13.dk/wp-content/uploads/2013/12/Skærmbillede-2013-12-11-kl.-21.45.24.png)
 * After I have updated my post the metabox look like this:
    [Screendump 2](http://18-13.dk/wp-content/uploads/2013/12/Skærmbillede-2013-12-11-kl.-21.49.10.png)
 * When I put in
 * `[averageRating]`
 * in a post gives me this
 * [Screendump 3](http://18-13.dk/wp-content/uploads/2013/12/Skærmbillede-2013-12-11-kl.-21.47.29.png)
 *   Forum: [Themes and Templates](https://wordpress.org/support/forum/themes-and-templates/)
   
   In reply to: [How to make a review site eg. using Meet GavernWP](https://wordpress.org/support/topic/how-to-make-a-review-site-eg-using-meet-gavernwp/)
 *  Thread Starter [Frederik Liljefred. M.D.](https://wordpress.org/support/users/frold/)
 * (@frold)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/how-to-make-a-review-site-eg-using-meet-gavernwp/#post-4348413)
 * I did write on their facebook page Yesterday it was free and it still says:
 * A free, responsive WordPress theme based upon our powerful GavernWP framework.
 * Well, where should I ask for help then?
 * UPDATE:
    You can download it from here…
 * [http://www.gavick.com/download/download-wordpress-themes/meetgavernwp.html](http://www.gavick.com/download/download-wordpress-themes/meetgavernwp.html)

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

1 [2](https://wordpress.org/support/users/frold/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/frold/replies/page/3/?output_format=md) …
[12](https://wordpress.org/support/users/frold/replies/page/12/?output_format=md)
[13](https://wordpress.org/support/users/frold/replies/page/13/?output_format=md)
[14](https://wordpress.org/support/users/frold/replies/page/14/?output_format=md)
[→](https://wordpress.org/support/users/frold/replies/page/2/?output_format=md)