Skip to main content
added 92 characters in body
Source Link
Danny
  • 41
  • 3

Looking over the code I am seeing a couple of things that may be causing issues.

  1. The single line comment 'Repeat the process...' is not being closed properly.

  2. As you are creating multiple custom loops, it's a good idea to reset the loops. You can do this by calling one of the below functions after each of your while loops.

    wp_reset_postdata(); or wp_reset_query();

As belinus has pointed out, you should use wp_reset_postdata(); as you are using WP_Query.

You can read more about this here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata and here: https://codex.wordpress.org/Function_Reference/wp_reset_query

I hope this information is enough to get things working the way you want.

Looking over the code I am seeing a couple of things that may be causing issues.

  1. The single line comment 'Repeat the process...' is not being closed properly.

  2. As you are creating multiple custom loops, it's a good idea to reset the loops. You can do this by calling one of the below functions after each of your while loops.

    wp_reset_postdata(); or wp_reset_query();

You can read more about this here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata and here: https://codex.wordpress.org/Function_Reference/wp_reset_query

I hope this information is enough to get things working the way you want.

Looking over the code I am seeing a couple of things that may be causing issues.

  1. The single line comment 'Repeat the process...' is not being closed properly.

  2. As you are creating multiple custom loops, it's a good idea to reset the loops. You can do this by calling one of the below functions after each of your while loops.

    wp_reset_postdata(); or wp_reset_query();

As belinus has pointed out, you should use wp_reset_postdata(); as you are using WP_Query.

You can read more about this here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata and here: https://codex.wordpress.org/Function_Reference/wp_reset_query

I hope this information is enough to get things working the way you want.

Source Link
Danny
  • 41
  • 3

Looking over the code I am seeing a couple of things that may be causing issues.

  1. The single line comment 'Repeat the process...' is not being closed properly.

  2. As you are creating multiple custom loops, it's a good idea to reset the loops. You can do this by calling one of the below functions after each of your while loops.

    wp_reset_postdata(); or wp_reset_query();

You can read more about this here: https://codex.wordpress.org/Function_Reference/wp_reset_postdata and here: https://codex.wordpress.org/Function_Reference/wp_reset_query

I hope this information is enough to get things working the way you want.