Thread Starter
lokjah
(@lokjah)
Still not sure what to do on this, I tried the template name route but, really I’m not sure what strategy to use here
I know it must be something really simple that I can do, if anyone knows I’d greatly appreciate it, as I’ll just end up doing multiple wp installs again, but i’d rather do it a more efficient way..
thanks
Happy New Year 🙂
It hardly appears you will need multiple installations of WP, but rather, you need to tweak your index so it recognizes where it is coming from (2-col vs. 3-col) and deals with it accordingly.
There are probably a number of ways to do this; cookies, url parameters, etc. But probably the cleanest and best way to do this is using a hidden form attribute to pass the page style to the next page.
It would probably look something like:
<form ...>
<input type="hidden" name="page_style" value="<?php $page_style ?>" />
....
</form>
I hope I understood your problem… Good luck.
Thread Starter
lokjah
(@lokjah)
hey navid, thanks alot for the help. could you explain a bit more how I would impliment this?
it sounds like it would do the job..
THANKS!
lok
Thread Starter
lokjah
(@lokjah)
I also found something else http://wordpress.org/support/4/6721
ryan says in that thread something about this:
excerpt:
…”You’ll either have to hand edit your rewrite rules or make index.php handle all of the different categories. index.php can be coded to output a different style for each category.”
I’m not exactly sure how this is implimented, but I also am showing specific posts by id in certain sections where category alone I dont think would be sufficient…
my head’s starting to hurt, i’m thinking its not that hard to do, I think my lack of wordpress vocabulary is part of my prob in searching for a solution…
Thread Starter
lokjah
(@lokjah)
OK, I just got a semi breakthru.. wOOT!
But I still have a problem…. I put the output buffer in on my two column page:
<?php
ob_start();
?>
and then ended my index with the replacement:
<?php
$page_source = ob_get_contents();
$replace_this = "href="http://mysite.com/blog";
$with_this = "href="http://mysite.com/newsection";
$new_page_source = str_replace($replace_this, $with_this, $page_source);
ob_end_clean();
echo $new_page_source;
?>
I did this as per the wiki page: http://wiki.wordpress.org/?pagename=HowTo%2FUseTemplatesInAnyDirectory
Now, progress was made in that when I click the “comments” link on an entry it loads the comments in my 2 column index… YES!…..
but…
if now I create a comment and hit “say it” I am then returned to the 3 column index where it displays the comments, taking me from my 2 column index again..
SO CLOSE!
any idea of what I could do further?
maybe something with wp-comments-post.php? could I do something to that file, OR make a copy of it and put it into the directory where my 2 col index is and somehow make it work?