Duplicate Content Displayed with AnWP Football Leagues plugin

Posted in: Newspaper
Post count: 4

Hello,

We are using the **AnWP Football Leagues plugin** together with the **Newspaper theme by TagDiv**, and we have a display issue.

## Problem:

On all AnWP pages (clubs, players, matches, etc.), the content appears **twice**:

1. Once **above the main site header**
2. And once **inside the main content area**, as expected

## Notes:

– We are not adding any AnWP shortcode manually in the post content.
– This happens on all AnWP custom post types (anwp_club, anwp_player, etc.)
– It looks like the plugin outputs content automatically, before the theme header loads.

## What we need:

We want to **show the content only once**, inside the main layout — and **remove the extra copy that shows above the header**.

Can you please let us know:

– How we can disable the automatic content output from the AnWP plugin?
– Or how to prevent this from happening in the Newspaper theme?

We’ve attached a screenshot showing the issue clearly.

https://prnt.sc/4dVvDrxhde3u

Thanks for your help!

Best regards,

Konstantinos Metaxakis

Post count: 35449

Hi,
This is the first time when I hired about the AnWP Football Leagues plugin, but after your details and the screenshot it appears that this is place in the cloud header and also in the content. So this is seeing the header like a page. Just to be sure it’s like this, please set in Newspaper > theme pane > header set it on no template, save the settings, clear the cache and check if the problem is resolved. If is resolved, then you need to fined out how the plugin is working and restrict it to access the cloud header templates.
Thank you!

Post count: 4

Good evening,

We found the solution and I am writing it here so that in the future if other users encounter a similar problem they will all know the solution.

In the class-anwpfl-template.php file of the plugin at the path:
/wp-content/plugins/football-leagues-by-anwppro/includes/

the line should be

134

if ( $post && in_array( $post->post_type, $this->plugin->get_post_types(), true ) && is_singular() && is_main_query() && ! post_password_required() ) {

it should be done like this:

if ( $post && in_array( $post->post_type, $this->plugin->get_post_types(), true ) && is_singular() && is_main_query() && in_the_loop() && ! post_password_required() ) {

Post count: 35449

Thank you for sharing with our community!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.