Chris Head
Forum Replies Created
-
Not using NextGen with my current theme
Forum: Themes and Templates
In reply to: Photolistic Child theme and random imagesI have changed themes.
Hi Mollysaurus
I tried the solution from WPyogi but found I had to add a second curly bracket at the end to make it work, as below.
#site-title {
display: block;
max-width: 100%;
text-align: center;
}}I have no idea why it works, it just does. It centers the site title and tagline.
Cheers
Forum: Themes and Templates
In reply to: Changing images in a themeAll good!!
I had typos in my unregister_default_headers plus my images were uploaded with a capitalised first letter whereas in the function they are called using all lower case.
Thanks for the help!!
Cheers
Chris
Forum: Themes and Templates
In reply to: Changing images in a themeHi Rev
Thanks for the asdvice so far..I’m working on unregistering the default image headers and registering my own; I have found two issues:
1. As in my code below, I can only unregister three of the default header images in Twenty Eleven theme. If I try any more I get the following error:
Parse error: syntax error, unexpected “T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /home/headless/public_html/wp-content/themes/twentyeleven-child/functions.php on line 53”
The line number coincides with the fourth image.2. On the Appearance > Header page of my child theme, the thumbnails for my new registered images are not there; all I get is the identifying tag as well as the remaining five default images.
While the images rotate randomly, when it gets to one of mine it is blank.
Your thoughts appreciated – http://headless.id.au/
‘//ADD NEW DEFAULT HEADER
function twentyelevenchild_header_in() {
$dir = (‘http://headless.id.au/wp-content/themes/twentyeleven-child’);
define( ‘HEADER_IMAGE’, ‘http://headless.id.au/wp-content/themes/twentyeleven-child/images/trish&danika.jpg’ );
register_default_headers( array (
‘arizona’ => array (
‘url’ => “$dir/images/arizona.jpg”,
‘thumbnail_url’ => “$dir/images/arizona-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘arizona’, ‘twentyeleven’ )
),
‘new-york’ => array (
‘url’ => “$dir/images/new_york.jpg”,
‘thumbnail_url’ => “$dir/images/new-york-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘new-york’, ‘twentyeleven’ )
),
‘trish&danika’ => array (
‘url’ => “$dir/images/trish&danika.jpg”,
‘thumbnail_url’ => “$dir/images/trish&danika-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘trish&danika’, ‘twentyeleven’ )
),
‘the-bean’ => array (
‘url’ => “$dir/images/the-bean.jpg”,
‘thumbnail_url’ => “$dir/images/the-bean-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘the-bean’, ‘twentyeleven’ )
),
));
}add_action( ‘after_setup_theme’, ‘twentyelevenchild_header_in’ );
// REMOVE SOME DEFAULT HEADERS
function twentyelevenchild_header_out() {
unregister_default_headers( array(
‘wheel’,
‘shore’,
‘trolley’)
);
}
add_action( ‘after_setup_theme’, ‘twentyelevenchild_header_out’, 11 );’Forum: Themes and Templates
In reply to: Changing images in a themeHi Rev
I’m working on unregistering the default image headers and registering my own; I have found two issues:
1. As in my code below, I can only unregister three of the default header images in Twenty Eleven theme. If I try any more I get the following error:
Parse error: syntax error, unexpected “T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /home/headless/public_html/wp-content/themes/twentyeleven-child/functions.php on line 53”
The line number coincides with the fourth image.2. On the Appearance > Header page of my child theme, the thumbnails for my new registered images are not there; all I get is the identifying tag as well as the remaining five default images.
While the images rotate randomly, when it gets to one of mine it is blank.
Your thoughts appreciated – http://headless.id.au/
‘//ADD NEW DEFAULT HEADER
function twentyelevenchild_header_in() {
$dir = (‘http://headless.id.au/wp-content/themes/twentyeleven-child’);
define( ‘HEADER_IMAGE’, ‘http://headless.id.au/wp-content/themes/twentyeleven-child/images/trish&danika.jpg’ );
register_default_headers( array (
‘arizona’ => array (
‘url’ => “$dir/images/arizona.jpg”,
‘thumbnail_url’ => “$dir/images/arizona-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘arizona’, ‘twentyeleven’ )
),
‘new-york’ => array (
‘url’ => “$dir/images/new_york.jpg”,
‘thumbnail_url’ => “$dir/images/new-york-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘new-york’, ‘twentyeleven’ )
),
‘trish&danika’ => array (
‘url’ => “$dir/images/trish&danika.jpg”,
‘thumbnail_url’ => “$dir/images/trish&danika-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘trish&danika’, ‘twentyeleven’ )
),
‘the-bean’ => array (
‘url’ => “$dir/images/the-bean.jpg”,
‘thumbnail_url’ => “$dir/images/the-bean-thumbnail.jpg”,
/* translators: header image description */
‘description’ => __( ‘the-bean’, ‘twentyeleven’ )
),
));
}add_action( ‘after_setup_theme’, ‘twentyelevenchild_header_in’ );
// REMOVE SOME DEFAULT HEADERS
function twentyelevenchild_header_out() {
unregister_default_headers( array(
‘wheel’,
‘shore’,
‘trolley’)
);
}
add_action( ‘after_setup_theme’, ‘twentyelevenchild_header_out’, 11 );’Forum: Themes and Templates
In reply to: Changing images in a themeThanks Rev. Voodoo
I had found the functions.php after I posted my query and was playing around with it.
I was not aware you could lose changes made to a WordPress theme so I will take your advice and instructions and create a child-theme.Cheers for the help!!
Chris