Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter RantFire

    (@rantfire)

    Thank you for the reply. I implemented your suggested code above the <form line, but it does not fix the problem. It just adds the following text to the page to the side of the form field: $sort: “”
    Should I be customizing the code inside your example? I had considered using an if statement to print a heading that would display which results they were seeing, but I couldn’t get that working either. I figured a proper selected option within the list would be best anyway.

    It really seems like the two { echo ‘selected=”selected”‘; } lines might be the cause of the problem, but it seems to say “if this option is selected show that it is selected.” It should be foolproof, it just doesn’t stay selected after refresh. Any other suggestions?

    Thread Starter RantFire

    (@rantfire)

    That seemed to do the trick. It works perfectly now. If I were you I would really publicize this aspect of your plugin more. The ability for the user to filter for highest rated posts is a very useful tool, especially if you’d like to keep the most recent posts on top by default, but also keep the most popular posts from being permanently buried under less popular. I’d consider adding it to the FAQ list, just because it’s a great feature. Either way, thank you for your help. Some plugin authors don’t provide much support at all and it’s encouraging to see so many resolved topics in your support forum.

    Thanks again.

    Thread Starter RantFire

    (@rantfire)

    Can you tell me how I would place the ‘meta_key’ => ‘ratings_average’ into the following code? The coding styles don’t seem compatible, how would I convey that info within the php below? Maybe copy and paste an example with it implemented, sorry I’m not a php expert.

    <?php $sort= $_GET[‘sort’]; if($sort == “date”) { $order= “orderby=date”; } if($sort == “highest_rated”) { $order= “orderby=meta_value_num”; } ?>

    <form action="" method="get">
    <select name="sort" id="sorting">
      <option value="date" <?php if ($sort == "date"){ echo 'selected="selected"'; } ?> >Most Recent Posts</option>
      <option value="highest_rated" <?php if ($sort == "highest_rated"){ echo 'selected="selected"'; } ?> >Highest Rated Posts</option>
    </select>
    <input type="submit" value="Submit" /></form>
    Thread Starter RantFire

    (@rantfire)

    The solution was to place the copied author code into a copy of the archives.php file, remove <?php get_template_part( ‘loop’, ‘archive’ ); ?> and then just make sure the <?php get_sidebar(); ?> code was in place and resave the file as author.php. I did have to add back in a couple post related divs to make it look right, but there is no more duplication problem in any browser.

Viewing 4 replies - 1 through 4 (of 4 total)