Custom theme loads pages twice with extra content
-
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?
- The topic ‘Custom theme loads pages twice with extra content’ is closed to new replies.