Skip to content

replace "wp_reset_query" with wp_reset_postdata #81

@kniebremser

Description

@kniebremser

phpcs brings the message:
wp_reset_query() is discouraged. Use the with wp reset postdata() instead.

References:
https://codex.wordpress.org/Function_Reference/wp_reset_query
https://codex.wordpress.org/wp_reset_postdata

wp_reset_query() is used several times in the plugin.

In functions/diplaypost.php line36 is wp_reset_query();

In taxonomy-characters.php line 50 is wp_reset_query();
In taxonomy-locations.php line 21 is wp_reset_query();
In taxonomy-locations.php line 52 is wp_reset_query();

I'm surprised both files have the same structure but in one file the function is called only once and twice in the other

In blog.php both are in a row
In blog.php line 33 is wp_reset_postdata();
In blog.php line 34 is wp_reset_query();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions