• I wanted to feature four pages instead of three on my front page, so I added “four” in this little code sequece:

    //set the areas array
        		$areas = array ( 'one' , 'two' , 'three', 'four' );

    And to my surprise it worked! Another featured page bubble appears on the front page. However, I cannot figure out how to edit it, as the customize theme tool only lets you configure 3 featured pages. How wuld I go about configuring the fourth+ pages?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter bsapaka

    (@bsapaka)

    okay, I solved this by going into class-admin-customize.php

    now how do I rearrange the alignment of the featured page icons so I have 1 row of 4, 2 rows of 2?

    Thread Starter bsapaka

    (@bsapaka)

    I used css to adjust the width of the .row.widget area

    Damn I’m good at answering my own questions.

    Thanks!

    No problem ??

    Excellent work!! Could do with more Members like you ??

    Can you provide a link as this has been requested before so would welcome seeing your code.

    I used css to adjust the width of the .row.widget area

    You should probably be using 4xspan3 (instead of 3xspan4) for the first line and 2xspan6 for the second.

    All the positioning is based on Twitter Bootstrap 2.3.3.

    Thread Starter bsapaka

    (@bsapaka)

    Can you provide a link as this has been requested before so would welcome seeing your code.

    Here is what I did:

    In the editor I went to “class-content-featured_pages.php” and searched the term “three” and came upon this bit:

    //set the areas array
        		$areas = array ( 'one' , 'two' , 'three');

    and added ‘four’ to the end of it:

    //set the areas array
        		$areas = array ( 'one' , 'two' , 'three', 'four' );

    This made a new menu item appear. After noticing that it was not editable in the customize tab, I eventually came upon this solution:

    In class-admin-customize.php, under themes>customizr>admin>inc>admin>class-admin-customize.php, I search “three” again, and for every chunk of code that had “three,” I copied and pasted it right after, and replaced all instances of “three” with “four.”

    For example

    //widget page three
    								'tc_theme_options[tc_featured_page_three]' => array(
    																	'label'    		=> __( 'Home featured page three' , 'customizr' ),
    																	'section'  		=> 'tc_frontpage_settings' ,
    																	'type'      	=> 'dropdown-pages' ,
    																	'priority'      => 90,

    And then,
    Copied and pasted and edited to get:

    //widget page four
    								'tc_theme_options[tc_featured_page_four]' => array(
    																	'label'    		=> __( 'Home featured page four' , 'customizr' ),
    																	'section'  		=> 'tc_frontpage_settings' ,
    																	'type'      	=> 'dropdown-pages' ,
    																	'priority'      => 95,

    Apply these steps four every instance of “three” to get the fourth/fifth and so on. Then, the customize tab will allow you to edit the destination, description, and button.

    The new button would overflow. So fit it onto the page, I read the article ElectricFleet provided and did what he recommended (thanks!). I changed all span4 to span3 in class-content-featured_pages.php to space the four buttons evenly. To spell it out for other beginners like me: twitter bootstrap has 12 columns. The number after “span” indicates the number of columns each div is to occupy. Span3 designated 3 out 12 columns for each div, giving me 4 button spaces.

    So trying to go above 4 x span3 will not look too good unless minimal content to show (before someone asks).

    I know Nic is looking at this so there may be a better solution around the corner.

    Hi bsapaka,

    Thanks for the solution. I followed your instructions and worked for me. However, as andersdn said (if I’m no wrong) images are aligned left in the bubbles, so when they expand onhover, I can see the left straight edge. How did you solve the problem andersdn?

    Thanks for your help,

    Hi Andersdn,

    Thanks for your response. I can’t really see how the images in your link are not centered, as I don’t know how the full image looks like. However, I see you managed not to see the lide-straight edges of the images. I guess you used a size other than 270x250px to workaround the problem. Could you please tell me, which image size you use in your layout?

    Thanks a lot ??

    Of course. That’s the site: https://vanilla.turborally.com/vanilla/. If you see, when rolling over the featured images, side-edges are revealed. Can you tell me how you got rid of that problem? I thought you did it my resizing the images and making them wider (?).

    Thanks for your help.

    In my computer everything seems to be centered ok on your site. However, don’t worry and thank you for your help, I’ll try to play a bit with image sizes.

    @bsapaka. Did you create “class-content-featured_pages.php” and “admin-customize.php” in child theme or modify in parent theme? Please share.Do we need to make changes in css also for more featured pages?I was successful in creating 6 featured page but after that couldn’t access admin panel.I did make changes in parent admin-customize.php.and child content-featured_pages.php.Now reinstalled parent theme and created child theme.Now website disappear when I create content-featured_pages.php file in child theme .I really need help.I have to create 6 featured pages on front page.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘four featured pages’ is closed to new replies.