![]() |
Slightly old topic now, but its the best thing (and most recent) I've found in hours of searching on how to remove the primary content from specific pages.
I had listed some questions a short time ago, but have managed to answer them both myself. Here are the questions I asked: 1 - can this be done in the reverse - ie: list the pages you do NOT want to show the PC on, rather then list the pages you want to KEEP the PC on .... 2 - is this "removing" the PC from the page, or 'cloaking' it ... 3 - this does not work when listing multiple pages using OR as per the original post (also posted by Jokorey and GamersChallenge, though they seemed to find another solution that suited their needs) Here are my solutions to issue 1 and 3 - not being a programmer I am unsure if they are 'best practice' but the edits seem to work fine: Issue 1 Reversing the method - list the pages you want to HIDE the content on, instead of listing the pages your want to SHOW the content on: Simply change the 'connector' (or what ever it is called) to "not equal too", ie: PHP Code:
PHP Code:
Issue 3 Listing additional pages using OR as per the original topic does not work, you need to list additional 'if' statements: I have done the following (keeping in mind I am listing pages I DO NOT want the primary content displayed on): PHP Code:
PHP Code:
Note my additional IF statement on the second line, and my additional </vb:if> on the last line Given that I have now included multiple pages using IF statements, I need to include those pages further on too, the next section immediately after the 3 closing IF 'statements'. So now I have: PHP Code:
Long post, sorry - trying to be as descriptive as possible Here is my entire code, that now hides the Primary Content on the pages I list, and allows me to hide that content on (in this case) 2 pages ... News and Food: PHP Code:
What still remains though, is the Issue 2 - does this 'remove' the content, or 'cloak' it ...? I guess the question is, am I going to be dinged by search engines for cloaking content? |
Okay, after stumbling around for most of yesterday I have not been able to get this to work, either as suggested by the OP or by my edits above.
- Using OR does not work - By including several IF statements that do NOT include the PC on various pages, I cannot turn it off on the main content.php page - adding additional IF statements to only show it on specific pages does not work either Off to find a different solution. Cheers |
Hi, I still have this working on one of my sites. What version vb are you running? I would not consider this cloaking. Using css to hide I feel is cloaking.
|
All times are GMT. The time now is 01:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|