Reputation: 3345
I'm using SimpleCorp theme, and I need to increase the number of those four picture-and-text blocks to six. I tried even to redirect index.php to my custom .php page template, but it didn't work at all...
Next thing I tried is, that in /wp-content/themes/simplecorp/admin/options/homepage.php I found this code below (well 4 blocks of it but with incremented numbers)
$options[] = array( "name" => "Content Box 1 Title",
"id" => $shortname."_homecontent1title",
"std" => "Awesome Features",
"type" => "text");
$options[] = array( "name" => "Content Box 1 Text",
"id" => $shortname."_homecontent1",
"std" => "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore.",
"type" => "textarea");
$options[] = array( "name" => "Content Box 1 Image",
"desc" => "Click to 'Upload Image' button and upload Content Box 1 image.",
"id" => $shortname."_homecontent1img",
"std" => "$blogpath/library/images/sampleimages/featured-img-01.png",
"type" => "upload");
$options[] = array( "name" => "Content Box 1 URL",
"id" => $shortname."_homecontent1url",
"std" => "#",
"class" => "sectionlast",
"type" => "text");
And by copy-pasting and incrementing numbers up to 6 which is the desired count, I created two more of them (5th and 6th). But when I tried to reload my wp-admin panel, hoping, that two more groups of settings would appear, it just showed me a blank page instead. I suppose, the count of homepage blocks is connected with something, which requires exactly four of them. But what?...
I'd be very grateful if anybody could suggest me a solution!
Upvotes: 0
Views: 161
Reputation: 1053
The jQuery carousel has nothing to do with the home content boxes - that controls only the featured Portfolio items at the bottom (if activated in theme options).
To add more boxes to the home page, you will need to duplicate one of the existing admin option boxes as you have noted, in admin/options/homepage.php. Be careful to make sure that you increment each number correctly for each box (there are several to change for each box) e.g. "Content Box 5 Title" and so on. If you get a blank page, that means you did it wrong! Go back and check carefully.
Next you will need to modify the theme/home.php page to echo out that new box contents. Just copy e.g. the fourth one that is there and paste below again, ensure that you increment the number to represent the new box: ('sc_homecontent5img') etc. Note that the last of each row should contain the CSS selector "last" to indicate the final element.
Finally, you will need to modify the theme CSS to ensure the new boxes line up and appear correctly. You could modify it to show 3 in a row, rather than 2 for example.
Upvotes: 0
Reputation: 1
Adding to the admin/options/homepage.php two more boxes (5&6) should result in them appearing in the options panel in admin. If you got a blank page, you probably made some small error with a "," or ";" somewhere? Or maybe you haven't changed all the numbers as needed?
You should try that again and get the 5&6 showing in admin. Than just add them in the home.php file in the theme's root folder.
Upvotes: 0
Reputation: 9
This looks like it's controlled by the behaviours.js file and these lines:
/*HOMEPAGE CAROUSEL STARTS*/
(function() {
var jQuerycarousel = jQuery('#projects-carousel');
if( jQuerycarousel.length ) {
var scrollCount;
if( jQuery(window).width() < 480 ) {
scrollCount = 1;
} else if( jQuery(window).width() < 768 ) {
scrollCount = 1;
} else if( jQuery(window).width() < 960 ) {
scrollCount = 3;
} else {
scrollCount = 4;
}
jQuerycarousel.jcarousel({
animation : 600,
easing : 'easeOutCirc',
scroll : scrollCount,
initCallback: function() {jQuerycarousel.removeClass('loading')},
});
}
})();
/*HOMEPAGE CAROUSEL ENDS*/
On this line
jQuery(window).width() < 960 ) { scrollCount = 3; } else { scrollCount = 4; }
change the 4 to a 6 and see if that does the trick.
Upvotes: 1