TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 500
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 166
  • Total: 166

Modifying Categories so it only shows 1 article instead of 5

Started by limitzero, September 18, 2012, 05:51:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

limitzero

SMF version: 2.0.2
TP version: TP 1.0
Default Forum Language: English
Theme name and version: Custom Theme
Browser Name and Version: FF 15
Mods installed: TP, Stop forum spam

Ok so let me try to explain, by default, I noticed that if say you were to go to www.site.com/index.php?cat=10 (dummy link of course)   it shows 5 articles under that page and then option to go onto next page and so on. Now, I looked around everywhere and I can't find a feature in the TP Admin Panel to make it so only 1 article would show up per page.

Now you maybe asking me why I would want to just show 1 article per page in that category view format instead of 5. Well, my reasoning to do this is I have Adsense ads placed in each articles, so Google won't play nice if they see their ads getting loaded 5x more than it should in one page.

Hence, my request is if anyone can guide me to which file might need editing under TP to change this category view only 1 article instead of 5, would really appreciate your help, thank you in advance!  :)

IchBin

I do believe that the TinyPortal>Settings>frontpage setting to only show a specified amount of articles on the frontpage will limit the per page like you want. Let me know if it doesn't work.

limitzero

Thanks IchBin, I have tried that, but it still stayed the same as before.

IchBin

I changed that setting to 1 in my test site. Created two test articles. Only one article displays on each page in the category. Are you wanting something different? Or am I misunderstanding you?

limitzero

Ok, so if you go to 'Tinyportal --> Articles --> Categories --> ' and click on the magnifying glass for a category (say my category has like 100 articles in it) it follows a link to http://mysite.com/index.php?cat=28   On that page, 5 articles are shown per page. I am looking to make it so only 1 article would show up per page if say Google Adsense crawl'd into that page.

The setting you are specifying is I think is for frontpage, I have no problem with that, I am only showing 1 article in the frontpage. It is the category pages that I would like to show only 1 article to. Hope you can help, thanks

lurkalot

Tp Admin > Categories >  click the category you want, then change "Articles per page: 5"  to your desired setting. And save.

Was that what you were looking for?  I'm only guessing as 5 articles per page is the default setting.

limitzero

Excellent, that is exactly what I wanted! Thank you lurkalot and IchBin for your support :)

lurkalot


This website is proudly hosted on Crocweb Cloud Website Hosting.