I’d go about it with a query string and CSS.
Add a query string to your links, so something like mysite.com/customtype/mypost?myview=concise
Then at the top of your single-customtype.php, have $myview = $_GET['myview'];
Add this to your body classes in header.php (how you do this depends on your theme, but for me it’d be <body <?php body_class( $myview ); ?>>).
Finally you can easily control what is and isn’t seen using CSS, eg body.concise .myclass { display: none; }
Hope that helps
Thank you Peter that is very helpful.
But if I wanted to have a completely different layout all together how would I go about doing that?
That’s the beauty of CSS… the same HTML can be displayed in different ways.
For example, a box can be floated right for normal view, or floated left for another, eg:
.myclass { float: right; }
body.concise .myclass { float: left; }
Doing it that way would keep your development to a minimum as you’d only need one set of code.
But, if you wanted to, the query string can still be used, eg:
$myview = $_GET['myview'];
if ( $myview != "concise" ) {
// code to display normal view
} else {
// code to display concise view
}
Oh, BTW, when I said originally “at the top of your single-customtype.php” I meant “at the top of header.php“!
Peter