What is the wrong in this code. Help please

3 replies
Hello
Wordpress-thesis theme custom_function codes. I always get error. What is the wrong?

function before_postbox_bottom() {
if (is_home()) {

<div id="text2">
<div id="text2a">
<div id="headerright">Rapid Weight Loss Techniques</div>
<div id="headerleft">The Best 20 Minute Workout Plan</div>
</div>
<div id="text2b">
<div id="text2b1">
<div id="thesis1">
<div id="thesis1main">
<div id="thesisimage1"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/5-no-fail-tips-to-motivate-yourself-to-diet.jpg" align="center" alt="Digg it!"/></a></div>
<div id="thesistext1">Other than physical appearance weight affects a person in many ways. This could be the overall quality of life, self-esteem, depression..</div>
</div>
<div id="thesis1b">There are a lot of positive changes once a person experience weight loss. It is for this reason why a lot of people are searching for a weight loss technique that will surely trim down those fats and get a super slim head turner body...</div>
</div>
<div id="thesis1a"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/ReadMore.jpg" align="center" alt="Digg it!"/></a></div>
</div>
<div id="image"><div id="thesis1">
<div id="thesis1main">
<div id="thesisimage1"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/exercise_078.jpg" align="right" alt="Digg it!"/></a></div>
<div id="thesistext1">If you are busy, not able to get up early morning or have no time for gym just follow this 20 minute home workout plan to stay
</div>
</div>
<div id="thesis1b"><ul>
<li>1) Jog : in one place for 3 minutes</li>
<li>2) Jumping jacks: 25 repeats
When landing, bend your knees slightly to reduce the impact on knee joints.</li>
<li>3) Crunches : 15 repeats
Lie flat on your back with your knees bent...</li>
</ul>
</div>
</div>
<div id="thesis1a"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/ReadMore.jpg" align="center" alt="Digg it!"/></a></div></div>
</div>
</div>

<!-- bottom boxes start -->

<div id="text2">
<div id="text2a">
<div id="headerright">Free Weight Loss Programs</div>
<div id="headerleft">Losing Weight the Healthy Way</div>
</div>
<div id="text2b">
<div id="text2b1">
<div id="thesis1">
<div id="thesis1main">
<div id="thesisimage1"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/epilepsy-ketogenic-diet.jpg" align="center" alt="Digg it!"/></a></div>
<div id="thesistext1">The race to fitness is on and a lot of people are getting into the band wagon.Some people do it to achieve a sexy body, </div>
</div>
<div id="thesis1b">some people just do it because they are embarrassed with the body they have now, while others do it simply to remain fit and heatlthy. As such, many fitness programs are out in the internet, in gyms, spas and fitness centers all over. </div>
</div>
<div id="thesis1a"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/ReadMore.jpg" align="center" alt="Digg it!"/></a></div>
</div>
<div id="image"><div id="thesis1">
<div id="thesis1main">
<div id="thesisimage1"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/weight-loss-food.jpg" align="center" alt="Digg it!"/></a></div>
<div id="thesistext1">Almost 108 million Americans were overweight or obese in 1999. Until now, obesity continues to be a serious problem and is predicted to</div>
</div>
<div id="thesis1b">reach epidemic levels by the year 2020.

One way to prevent this scenario is to make people aware of the risks of being overweight or obese.

Here are some diseases that you are putting yourself in risk of if you are carrying a lot of extra pounds:
</div>
</div>
<div id="thesis1a"><a href="CLICKABLE-LINK"><img src="http://fitdietplans.com/wp-content/uploads/2010/07/ReadMore.jpg" align="center" alt="Digg it!"/></a></div>
</div>
</div>
</div>

}
}
add_action('thesis_hook_before_postbox', 'before_postbox_bottom');
#code #wrong
  • Profile picture of the author pmrc
    what is the error that you are getting?
    {{ DiscussionBoard.errors[2385864].message }}
  • Profile picture of the author alkantenik
    My error is about div area. Because when I delete divs and write:

    function before_postbox_bottom() {
    if (is_home()) {

    }
    }
    add_action('thesis_hook_before_postbox', 'before_postbox_bottom');


    There is no error message like this. custom_functions/........../line9562
    Thanks.
    Signature
    Wordpress Designer
    Skype: wordpress_alkan
    {{ DiscussionBoard.errors[2385943].message }}
  • Profile picture of the author pbarnhart
    Its php - got to separate it from your html

    You need to:

    Code:
    function before_postbox_bottom() {
    if (is_home()) {
    ?>
    <div id="text2">
    <div id="text2a">
    .....stuff....
    </div>
    </div>
    
    <?php
    
    }
    }
    {{ DiscussionBoard.errors[2386110].message }}

Trending Topics