• The website in question is using a custom theme that includes a hit counter, which is when I noticed that any given webpage is loading multiple times.

    For instance, the theme includes a template for single posts, and a given post includes a hit counter – but every time the webpage loads the counter increments by 2. WordPress is loading pages so that the hit counter double counts every time.

    WordPress is setup to use permalinks as /category/post-title, to disable the www, and to use a static homepage.

    I have disabled all plugins and the problem persists. I have double- and triple-checked the hit counter code and it is scripted correctly. I have installed statpress, and it notes that a given page is loaded twice while also loading the ‘next’ content piece based on id number. I have confirmed this behavior via the database by checking that the hit counter on the next page has increased when I had not even loaded that page yet.

    Does anyone have an idea either why wordpress is behaving this way, or how to ensure any given post/page is only loaded once?

Viewing 1 replies (of 1 total)
  • Thread Starter seacoastweb

    (@seacoastweb)

    Hoping to make this mess a bit clearer – when I go to the home page URL, Statpress shows the home page loaded twice and another page loaded once EVERY time the home page is loaded. The extra page loaded is numerically the next ID after the home page.

    Does this have something to do with wordpress generating ‘next’ and ‘previous’ links? Even so, why does the home page itself get loaded twice?

    Banging my head on the desk here, any help appreciated.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom theme loads pages twice with extra content’ is closed to new replies.