Wordpress: Hardest Question Ever

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gnarxy
    Confirmed User
    • Jun 2008
    • 233

    #1

    Wordpress: Hardest Question Ever

    I have been at this for well over 3 hours and feel like smashing everything in my room..

    The Set-up:

    I am trying to change my Wordpress theme on a site that is just about 2 years old. Fate would have it that the theme I want to update to makes all of my previous gallery pages explode and become one giant mess.

    My Goal:

    Somehow be able to have all the Wordpress gallery pages that are already built to use the current theme, and to have my new gallery pages use a different theme.


    Thoughts: There has to be a solution.. There is a plugin that lets the visitor on your site be able to switch the themes of your blog. I don't know if there is some PHP I could use to "use this theme - if post date is after *certain date* and this theme if not" or something like that. I have used every combination of words I could to describe this problem to Google and have yet to hit anyone even asking the same question.

    Any help would be MUCH appreciated and I will love you forever and ever!

    //Jared
  • Babaganoosh
    ♥♥♥ Likes Hugs ♥♥♥
    • Nov 2001
    • 15841

    #2
    Are you using the latest version of wordpress?
    I like pie.

    Comment

    • cryptie
      Confirmed User
      • Jul 2007
      • 114

      #3
      can you change them all to a seperate catagory? make another catagory, cal it "old site" (lets say its catagory 54)

      then in your NEW theme, you have "post.php" create "postold.php and copy your OLD post.php into there.

      PHP Code:
      <?php
      if (is_category(54)) {
         include(TEMPLATEPATH . '/postold.php');
      } else {
         include(TEMPLATEPATH . '/post.php');
      }
      ?>
      Signature coming soon! Just as soon as my first site goes live! ETA this weekend

      Comment

      • cryptie
        Confirmed User
        • Jul 2007
        • 114

        #4
        oh, also forgot, set "old site" catagory invisible, and make all old posts a child of "old site" so they still show up in proper cats.
        Signature coming soon! Just as soon as my first site goes live! ETA this weekend

        Comment

        • gnarxy
          Confirmed User
          • Jun 2008
          • 233

          #5
          Originally posted by Babaganoosh
          Are you using the latest version of wordpress?
          not currently but if the new one has some easy fix or someone finds a way to do it through the current version I would update it in a heart beat.

          Comment

          • gnarxy
            Confirmed User
            • Jun 2008
            • 233

            #6
            Originally posted by cryptie
            can you change them all to a seperate catagory? make another catagory, cal it "old site" (lets say its catagory 54)

            then in your NEW theme, you have "post.php" create "postold.php and copy your OLD post.php into there.

            PHP Code:
            <?php
            if (is_category(54)) {
               include(TEMPLATEPATH . '/postold.php');
            } else {
               include(TEMPLATEPATH . '/post.php');
            }
            ?>
            The problem is that my galleries are getting butchered. Those are wordpress pages not posts. When you write a page you don't use a Category, those are only for the posts. There IS however a "Page Template" but I couldn't figure out how I could have a Page Template use a different theme than the entire site is using.

            Comment

            • FlexxAeon
              Confirmed User
              • May 2003
              • 3765

              #7
              not really checking my work or testing it but something like this might be possible (unless the issue is not so much stylesheet related).... duplicate your old CSS file and then do an if/then in the header (kinda like what cryptie did) to pull the proper CSS file. Then also do the custom template if/then statement

              again.. just off the top of my head but i'm sure something along those lines would work.

              as i keep typing, i think it might depend on if there is a "template checker" function already built into WP
              flexx [dot] aeon [at] gmail

              Comment

              • gnarxy
                Confirmed User
                • Jun 2008
                • 233

                #8
                Originally posted by FlexxAeon
                not really checking my work or testing it but something like this might be possible (unless the issue is not so much stylesheet related).... duplicate your old CSS file and then do an if/then in the header (kinda like what cryptie did) to pull the proper CSS file. Then also do the custom template if/then statement

                again.. just off the top of my head but i'm sure something along those lines would work.

                as i keep typing, i think it might depend on if there is a "template checker" function already built into WP
                Yes, the straight CSS switch doesn't work I tried that a couple of ways. I can't find in the WP files where it defines what theme is being used. I know its somewhere b/c like I said that one plugin I found allowed the surfer to switch the theme that they wanted to see themselves.

                I am trying to hack this plugin apart now to have it set the theme to the Old Theme for the old galleries but haven't had any luck yet.

                Comment

                • FlexxAeon
                  Confirmed User
                  • May 2003
                  • 3765

                  #9
                  Originally posted by gnarxy
                  Yes, the straight CSS switch doesn't work I tried that a couple of ways. I can't find in the WP files where it defines what theme is being used. I know its somewhere b/c like I said that one plugin I found allowed the surfer to switch the theme that they wanted to see themselves.

                  I am trying to hack this plugin apart now to have it set the theme to the Old Theme for the old galleries but haven't had any luck yet.
                  theme being used is probably set/defined in the database. and i'd assume the plugin you found changes it from being defined by database to defined by cookie.

                  the quick answer might be to install that plugin, then use if/then's that rely on functions/variables that the plugin uses.

                  and... you've probably already done this but, search the support forums at wordpress.org. so many people use wordpress, i've almost always found info & examples on some crazy hack ideas i've had
                  flexx [dot] aeon [at] gmail

                  Comment

                  • Nineteen85
                    Confirmed User
                    • Jul 2008
                    • 288

                    #10
                    Wordpress pisses me off on a daily basis

                    But it's like your first love, you can never stay mad at wordpress.

                    Oh sweet, binary coded wordpress

                    mmmmmmmmmmm
                    25% OFF ALL DESIGN / DEVELOPMENT WORK FOR A LIMITED TIME

                    Web designer / developer specializing in;
                    HTML, CSS, PHP, Wordpress, Jquery

                    Comment

                    • gnarxy
                      Confirmed User
                      • Jun 2008
                      • 233

                      #11
                      Originally posted by FlexxAeon
                      theme being used is probably set/defined in the database. and i'd assume the plugin you found changes it from being defined by database to defined by cookie.

                      the quick answer might be to install that plugin, then use if/then's that rely on functions/variables that the plugin uses.

                      and... you've probably already done this but, search the support forums at wordpress.org. so many people use wordpress, i've almost always found info & examples on some crazy hack ideas i've had
                      Yeah I went there and can't find anything.. frankly I am baffled that no one else has had this problem/asked about it on wordpress.org

                      I am right now trying to hack apart that Theme Switcher plugin code. It looks like you are correct about it being a cookie. This file is a freaking beast lol.. I'm going to see if I can make any headway.

                      http://rafb.net/p/pV3QlB90.html

                      Comment

                      • kahell
                        Confirmed User
                        • Aug 2005
                        • 292

                        #12
                        learn new things here

                        Comment

                        • kahell
                          Confirmed User
                          • Aug 2005
                          • 292

                          #13
                          wordpress data base is great

                          Comment

                          • gnarxy
                            Confirmed User
                            • Jun 2008
                            • 233

                            #14
                            kahell is that some cryptic secret message for me to find out my answer? =)

                            Comment

                            • cryptie
                              Confirmed User
                              • Jul 2007
                              • 114

                              #15
                              Originally posted by Nineteen85
                              Wordpress pisses me off on a daily basis

                              But it's like your first love, you can never stay mad at wordpress.

                              Oh sweet, binary coded wordpress

                              mmmmmmmmmmm
                              wordpress is hardly binary coded :p

                              also, gnarxy, I misread your problem, I thought it was posts. will post again at lunch.
                              Signature coming soon! Just as soon as my first site goes live! ETA this weekend

                              Comment

                              • mona
                                Registered User
                                • Feb 2008
                                • 1940

                                #16
                                Wordpress is really finicky about versions, as was mentioned above...Some stuff only works in 2.0 and above, etc. and so on. So, I would try to update to the latest version first :-)

                                Comment

                                • gnarxy
                                  Confirmed User
                                  • Jun 2008
                                  • 233

                                  #17
                                  Hey, thanks everyone for the replies and ideas. What I ended up doing was a slight work around using the Page Template feature. It wasn't exactly what I wanted but the old galleries are intact now at least and not exploded all over the pages.

                                  again, thanks everyone for the help and happy sales!

                                  //Jared

                                  Comment

                                  • cryptie
                                    Confirmed User
                                    • Jul 2007
                                    • 114

                                    #18
                                    good job. guess i don't need to look into it.
                                    Signature coming soon! Just as soon as my first site goes live! ETA this weekend

                                    Comment

                                    • FlexxAeon
                                      Confirmed User
                                      • May 2003
                                      • 3765

                                      #19
                                      clearly me and cryptie have boners for wordpress hacking lol

                                      glad you got it worked out. care to give a quick rundown of what the solution was?

                                      code talk gets me hot...
                                      flexx [dot] aeon [at] gmail

                                      Comment

                                      • gnarxy
                                        Confirmed User
                                        • Jun 2008
                                        • 233

                                        #20
                                        Well the major problem was I was going from a 3-column theme to a 2-column so first thing I did was take out all of my sidebar widgets and set it up for the new theme. I then made it so the galleries would fit into the main column but the posts for them still wouldn't work. So all I did was simply set the front page display of posts to the amount of new posts (with the new theme) I made. All my backlinks into the the old galleries look fine so I don't think its a total lost, google will still read the old posts, they just aren't displayed lol


                                        I could be completely dumb on it all but I was content with the final outcome. thanks you guys again for getting the brain juices flowing it helped me look at it all from a different angle

                                        //Jared

                                        Comment

                                        • cryptie
                                          Confirmed User
                                          • Jul 2007
                                          • 114

                                          #21
                                          it would have all been so much easier if you had posted the link so we could have seen the problem :p

                                          were you using tables, were you using divs, was it xhtml comp.? did you break the wordpress loop when removing your column?

                                          glad you got it running, put it through the w3 validator and see if it's up to par. (sometimes it's helped me find errors when my brain wasnt working properly

                                          http://validator.w3.org/
                                          Signature coming soon! Just as soon as my first site goes live! ETA this weekend

                                          Comment

                                          • gnarxy
                                            Confirmed User
                                            • Jun 2008
                                            • 233

                                            #22
                                            it was all divs, and i was breaking it all b/c the galleries were wider than the container. Basically it was a two-column layout. So for the old gallery pages I made a template that just eliminated the one column and it then had double the space to use.

                                            Comment

                                            • ez12
                                              Confirmed User
                                              • Apr 2001
                                              • 2438

                                              #23
                                              this is way to complicated for me..
                                              Main sites: Duclerck.com & Diderote.com My Hosting: AmeriNOC
                                              My Sponsors: NewNudeCash, Silvercash, Sapphic Cash, BCash4you
                                              Email: webmaster @ duclerck.com

                                              Comment

                                              • cryptie
                                                Confirmed User
                                                • Jul 2007
                                                • 114

                                                #24
                                                Originally posted by gnarxy
                                                it was all divs, and i was breaking it all b/c the galleries were wider than the container. Basically it was a two-column layout. So for the old gallery pages I made a template that just eliminated the one column and it then had double the space to use.
                                                not that you need it anmore, but did you try this in your main content div?:
                                                PHP Code:
                                                overflow : hidden; 
                                                
                                                Signature coming soon! Just as soon as my first site goes live! ETA this weekend

                                                Comment

                                                Working...