WordPress.org

Ready to get started?Download WordPress

Forums

Where did they go from here
[resolved] A few bugs (4 posts)

  1. L D
    Member
    Posted 3 years ago #

    Hello,

    Just a few bugs... couldn't figure them out. The number of posts to display is always showing 5 posts even if you change the number. Also, under "Output Options" > "Title of Posts:", the box doesn't retrieve code properly. I had the following entered:

    <h4 class="entry-title">Others Also Looked At...</h4>

    and it messes up the format in the box after you save. So when you go back to make a few changes, the wrong format appears and saves for every tweak.

    Hope that helps, thanks.

  2. L D
    Member
    Posted 3 years ago #

    In case anyone is scratching their head over the first admin option... "Number of Posts to Display"...

    Problem: Say you want to display 5 posts but 6 always comes up instead. To fix, you would have to change the 6 to a 5. This is actually caused by a logic error.

    The Fix:

    First open where-did-they-go-from-here.php. Find the following line:
    if ($count > $limit) break; // exit loop if we cross the max number of iterations

    Change it to the following:
    if (!($count < $limit)) break; // exit loop if we cross the max number of iterations

    The "Number of Posts to Display" option will now function correctly. Still working on the second bug...

  3. L D
    Member
    Posted 3 years ago #

    The second bug's solution...

    Problem: if you enter HTML code (or probably any code for that matter) into the admin field "Title of posts," it will save correctly but when the page reloads, the code is stripped out. If you do not re-enter the title with the code, then it will come out all weird-looking. The reason is because stripslashes was applied when the title was retrieved for display but the code was not escaped.

    The Fix:

    First open admin.inc.php.

    Then find the following line:
    <input type="textbox" name="title" id="title" value="<?php echo stripslashes($wherego_settings[title]);

    Replace it with this:
    <input type="textbox" name="title" id="title" value="<?php echo attribute_escape(stripslashes($wherego_settings[title]));

    You will now be able to use code in the "Title of posts" admin field.

  4. idearius
    Member
    Posted 3 years ago #

    Didn't experience the number of posts bug, but the heading problem popped up really soon when I added style info.

    Thanks for the fix, it does work.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic