wordpress is_front_page not working

Texashiker

Lifer
Dec 18, 2010
18,811
198
106
Why isn't this working?

Code:
<?php if (is_front_page()) { 'code goes here'; 

} else {

'code goes here';

}

?>
I am trying to get the blog roll to appear on the home page, but amazon banner appear everywhere else.

When I put the bookmark code in where it goes, the code crashes.

Code:
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>

error is

Parse error: syntax error, unexpected T_STRING in /path removed/wp-content/themes/librio/sidebar.php on line 51
 
Last edited:

HURRIC4NE

Member
Apr 17, 2012
173
0
0
Why isn't this working?

Code:
<?php if (is_front_page()) { 'code goes here'; 

} else {

'code goes here';

}

?>
I am trying to get the blog roll to appear on the home page, but amazon banner appear everywhere else.

When I put the bookmark code in where it goes, the code crashes.

Code:
<?php wp_list_bookmarks('title_li=&categorize=0'); ?>

error is

Parse error: syntax error, unexpected T_STRING in /path removed/wp-content/themes/librio/sidebar.php on line 51

i think you're having problems with the theme... are you using any advertisement services on your website?
 

Texashiker

Lifer
Dec 18, 2010
18,811
198
106
i think you're having problems with the theme... are you using any advertisement services on your website?

I have an adsense banner in the sidebar.

At the top of the sidebar there is a

Code:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>

At the bottom of the sidebar is a

HTML:
<?php endif; ?>

The code I am trying to add is inside the dynamic_sidebar if code.

Will an if inside of an if cause problems?

EDIT

I removed the if dynamic sidebar code, and the closing if statement and nothing changed.
 
Last edited: