Thesis Theme weirdness; can't get code to execute in CustomFunctions.php

Hello and good evening!

I am testing a site at:

http://www.test.onlinedivorcecoach.com
(protected directory)
user: sds
pw: 777

I am having a weird problem. I need to put a slider on the home page. I installed one and tried to execute it in customfunctions.php-- which is obviously a place where you enter PHP code into the theme.

I used:

<?php
echo do_shortcode('[slider_pro id="1"]');
?>

...to access the slider. What you see on the site now is what I get. Two slides stacked up... It doesn't work.

So I installed and tried out another slider plugin (WP Slider).

And that slider uses PHP code from the start, rather than shortcodes...

I pasted the PHP code in the same place as where my current, broken slider is at-- and nothing happened. The page loaded as if I had put nothing at all.

So two slider plugins, and both fail. I could try a third I guess...

If anyone could help me with this, I would be so grateful. Many thanks in advance!
mellijaeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:
Off-topic thought:

Moving from Weaver to Thesis is not all that great of a move.  Thesis is certainly cleaner but it does things its own way and that way is usually idiosyncratic with the predictable result.

On-topic:

I'm not totally sure what you did with the shortcode and custom functions.  When I view source on the page, I see:

<?php
echo do_shortcode('[messagebar]');
?>

Which I should never, ever see unless the code is being escaped somehow.

For your slider, I see the HTML of it but I don't see any javascript or CSS specifically referencing the slider.  So it displays the HTML as built and provides none of the dynamic effect.
0
xtermCommented:
The Apache web server has to be configured to launch the PHP interpreter for the file extension of that page... if the page is named index.htm/html or default.htm/html, its likely that your Dreamhost site isn't set up to parse PHP for those.

If you call your slider on a separate page named something.php, does it load?
0
mellijaeAuthor Commented:
Thanks Jason. I totally agree about Thesis... I'm not moving there-- believe me. Lesson learned.

This is the firm's main site, that was built a few years ago by a contractor. I am just trying to spruce it up...before we have the thing redone properly.

I think the reason you see the php code is because I disabled the plugin that it is calling. (messagebar) I was just checking to see if that was causing a clash.

As far as what you wrote about seeing the HTML... I'm not sure what you mean.

But check this out: I started disabling plugins and I found that one was clashing. So now, SOMETHING is happening, but I'm not sure what. The images are not showing, but the timer animation is...

Now that something is happening, can you see any code that helps you?
0
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

mellijaeAuthor Commented:
@xterm: I think the root file on a Wordpress installation is called index.php, unless I don't know what I'm talking about!

Also, there are other PHP functions happening in the same place that the slider is failing.

For example, there is..

is_home if-else statement, which is also where I inserted the PHP
0
Jason C. LevineDon't talk to me.Commented:
Very weird.  When I look at the page now with Firebug, I see the transitions from the javascript with correct HTML.  The CSS is still missing but that may be coming from the script in which case Firebug won't really see it.

I do get a 404 error on SimpleStats, so maybe disable that one too.

 
0
xtermCommented:
Are you perhaps putting it inside a larger block of echo() code?

jason1178 is correct, you should NEVER be able to view the php tags in source code, which is why I ask.  Can you move it elsewhere just to be sure?
0
mellijaeAuthor Commented:
Hi guys. The message bar php was in a different place-- it was in an area called "open hooks" and there was a checkmark under the box that said "execute php on this hook", which was unchecked. When I checked it... Well, you can see it on the page.

I could have just commented it out or delete it, but I just wanted to see if that was the issue.

All plugins are now disabled, except for the slider.
0
Jason C. LevineDon't talk to me.Commented:
Try a different WordPress slider at this point.  Let's see if we can get a simple one to work at all.
0
mellijaeAuthor Commented:
Oh... And whomever developed this did something weird. Or, more likely, there were two different developers at two different times. But--

There is a place in the theme called "open hooks" which is where the message bar code is at, and you can see it just above the animated timer, in the same div as slider.

There is also a page to edit called customfunctions.php-- which does the same thing as "open hooks" page, but the open hooks page divides up the code into neat little windows. I guess it's for inserting code in the right parts-- "before header", "after content", etc.-- with less chance of making mistakes...

But either way, whether I put the slider code into customfunctions.php or insert the code in the same place as the message bar code on the stupid "open hooks" page-- the result is the same.
0
mellijaeAuthor Commented:
Okay. I installed WP Slider, highly rated by lots of users... and nothing happens at all. See it in inaction right now...

Screw it, I'll try a third, just to be sure. One sec...
0
Jason C. LevineDon't talk to me.Commented:
Forget about all that for a moment and just switch out the current slider with one like this:

http://wordpress.org/extend/plugins/smooth-slider/

Try it with the do_shortcode( '[smoothslider]' ) first.

0
Jason C. LevineDon't talk to me.Commented:
>> Okay. I installed WP Slider, highly rated by lots of users... and nothing happens at all. See it in inaction
>> right now...

Alright, but this tells us something.  It isn't a CSS issue, it's definitely javascript.  All of the code is correctly placed but you get no transition effects no matter what.

Without being able to really get deep into thing, I'm going to guess that you have some jquery conflicts going on either via the theme or garbage leftover from old/poorly coded plugins.

0
mellijaeAuthor Commented:
Oh no. The third slider-- the one you suggested-- seems to be working.

How could two in a row not work? The ones that don't work come highly rated. The one I want to use, because of it's features has 863 reviews with five stars!

And I really can't have a link back to the plugin developer's page with this Simple Slider...

Any idea how this could be happening? This is a real bummer.
0
mellijaeAuthor Commented:
And thank you so much too! (sorry, I forgot to say it above)
0
Jason C. LevineDon't talk to me.Commented:
>> How could two in a row not work?

Javascript conflicts.  Probably JQuery to be specific.

The more javascript-based stuff there is on a page done by different developers at different times, the more likely that functions are named incorrectly or duplicated or both or JQuery versions are fighting with each other.  

When JQuery gets messed up it tends to just stop.  All of the stuff you expect to see happen, doesn't.  So that's why we saw the double images with the first slider and nothing on the second.  The first had no CSS setting the divs to hidden except in the JQuery script and the second had a default to hidden divs but no ability to make it visible.

The plugin that I recommended is a simpler beast and apparently can tolerate the environment.

So now you have to troubleshoot the jquery stuff...good luck with that as it will involve unraveling all of the other script-based crap on the page and leaving out includes until you figure out which file is killing things.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mellijaeAuthor Commented:
Thank you very much. As usual sir.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.