Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Make simple:press compatitle with jetpack stats
Avatar
bjj scout
Member
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2014 - 1:47 am

Jetpack stats isn't displaying pageview and visits from the forum section of the blog, I have taken a look at the forum theme (stacked) I'm using right now and discovered that neither <?php wp_head(); ?> nor <?php wp_footer(); ?> is in the header and footer section of the theme. 

How do I add <?php wp_head(); ?> before the closing </problem-with-post-edit-buttonead> in the head section of the theme and <?php wp_footer(); ?> before the closing </body> in foot section of the theme?

 

Any help regarding this issue will be highly appreciated. 

Regards

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2014 - 2:17 am

think there is a misunderstanding...  remember, ALL the simple press content appears on a standard wp page...  so its up to the wp theme for that page to do the standard wp header and footer calls, not simple press...

all the forum content is displayed via the wp the_content filter, which is long after the page display has begun...

that said, I would probably bet that your wp theme is doing the header and footer stuff...  but since ALL simple press content appears on a single page, jetpack stats would be incorrectly assuming that there is but a single page of stats to display... it assumes the page is static in content...

again, we actually display all forum content on that single wp page allocated to the forum... the appearance of multiple pages within the forum is just url rewrite black magic..  of course, its all fully supported within the wp api...  but that single page content displayed is fully dynamic based on url rewrite data...

the stats program would be better served to look at the canonical url of the page rather than the absolute wp page url..  unfortunately, this is how too many plugins deal with forums, e-commerce and other plugins that dynamically display page content...

Avatar
bjj scout
Member
Free Members
sp_UserOfflineSmall Offline
Dec 13, 2014 - 6:41 am

Thanks for the update, I'll try to place a hook to override that for Google analytics instead.

 

Is there an option to turn off completely the display of "Unread and recently updated topics" and /or "forum stats section entirely" ? 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Dec 13, 2014 - 6:50 am

bjj scout said

Is there an option to turn off completely the display of "Unread and recently updated topics" and /or "forum stats section entirely" ? 

Absolutely. Simple:Press is template driven so it is an easy task to edit the template to change the display. In this case, for the stats, that would be the spFoot.php template in the /templates folder of whatever SP theme you are using. The stats section is displayed with the code block that starts with the comment:

# Start the 'stats' section

so you can remove the entire section (between the section start and section end calls) or just the parts you prefer not to display. Hopefully most of the function names describe what they display.

The unread/new posts list which is shown on the front view of the forum can be located in the spGroupView.php template - right at the end - the function call named sp_RecentPostList(). Just comment out or remove the line.

As always we recommend that you create your own SP child theme or custom theme so that any customisation is not lost during a future update.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620