![]() |
Excluding a category from Recently Added? Hi, I have a website that has some graphic pictures on it (labor and birth pictures) and I want to know if it is possible to exclude display of pictures in this category in the Recently added display? Thanks, Vickie |
Just edit the function display_gallery and add a clause in the function like so where cat is the cat you dont want displayed $exclude_cat="AND cat != 'SOMECATNUMBER'"; Thats it |
Where can I find this function? what file is it located in? index??? Aceman |
Removed: see below. I figured this out. Aceman |
Got it working: at line 454 in file "pp-inc.php": $catquery = ""; $cattype = "c"; $exclude_cat="AND cat NOT IN (6019,6020,6021,6022,6023,6024,6025,6026,6027,6028,6029,6030,6031,6032,6033,6034,6035)"; if ($rcols < 0) $rcols = 4; |
This excludes all the categories I do not want showing in the latest images, Most Popular, and Random Images areas on the gallery index page. |
If you have a lot of categories and only want to show the images from one or two how would you go about that? |
You could say: AND cat IN (XXX,XXX) where XXX is the cat you want to list from. |
Thanks Michael :) |
Doesn't seem to work either way using 5.03, I've tried both and the thumbs still come from all cats |
$exclude_cat doesn't seem to work in pp5. The only query that $exclude_cat seems to be part of is in search.php. Does anyone know which query $exclude_cat should be added to prevent specific categories from appearing in the "recently added" section? Thanks |
How about adding an option to each category to tell whether to include in the random/recent/top-rated/etc. views ? This seems to be a common request I've seen more than a few times. |
$exclude_cat will work if you place it in the proper place. My post above is an example to add it to the display_gallery function |
Exclude user I'd like to excude a specific user from showing up in most recent. Is there a way for me to modify the code to do that? |
Quote:
I cant find display_gallery in my FTP. :confused: Can you be more specific in which files I would have to go into to find it? I apologize for I am still very new with all this. |
its in the file pp-inc.php as stated above |
OO ok now I have found it. The question I have now is what is the catnumber and where do I find that? Is it the order number because I tried that and it did not work. |
order number? Your getting me confused here. You input a cat variable you dont want to display in there. |
Quote:
Well I dont know where to find the cat variable. Ive checked in the admin statistic log and found cat id's and I input them into the code above in my FTP but that did not work. So my question is where do I find the cat variable? :confused: |
Okay a cat variable would be whichever category you do not want photos not showing from in the recent uploads etc. Say you have a cat that has a numeric id of 507 and want to exclude those photos you would put 507 in there. |
| All times are GMT -5. The time now is 11:25 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0