• HELP! I am on a deadline and this is driving me crazy. WordPress Discover theme, I would like to add 4 additional image box headers, images, text and link lines. I was able to adjust the options.php file to add these add’l components, and changed the element.php file to reflect 8 columns. When I view the site I get the first row of images, but the second row is ragged and stacked all wrong. What aren’t I doing or what am I doing word. Again this is for the Discover theme.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Please post the link to your site

    hi,

    copy in your child theme the file “element-boxes.php”.
    Change the very first line :

    <?php for ($i = 1; $i <= 4; $i++) { ?>

    to 8 i guess (you want 8 boxes, right ?)

    <?php for ($i = 1; $i <= 8; $i++) { ?>

    then, do the same, ie copy the file “options.php ” in you child theme.
    And update by adding as much as new boxes number :

    $options[] = array( "name" => "Homepage Box 4 heading",
    						"desc" => "Heading for homepage box4.",
    						"id" => "box_head4",
    						"std" => "",
    						"type" => "text");
    
    	$options[] = array( "name" => "Homepage Box 4 text",
    						"desc" => "Textarea for homepage box4.",
    						"id" => "box_text4",
    						"std" => "",
    						"type" => "textarea");
    
    	$options[] = array( "name" => "Homepage Box 4 thumbnail image",
    						"desc" => "215px x 130px exact. Upload your image for homepage box 4.",
    						"id" => "box_image4",
    						"type" => "upload");						
    
    	$options[] = array( "name" => "Homepage Box 4 link",
    						"desc" => "Paste here the link of the page or post.",
    						"id" => "box_link4",
    						"std" => "",
    						"type" => "text");

    i’m not sure but i hope it helps …

    Thread Starter 7dezignz

    (@7dezignz)

    Thank you, I’ve copied as indicated however my page is the same, with all boxes not aligning. The one thing i did not understand in your instructions was the “copying in my child theme?” I’ve saved the original coding, however I’ve made these changes on the element-boxes.php file and the options.php file. Am I still doing something wrong?

    hello,

    it is recommended not to modify an orignal theme, but creating a child theme because if you update the (original) theme you will lose all your modifications. You can find tutorials like this one

    But briefly , inside the folder “wp-content\themes” :
    – create a new folder (ex “my-child-theme”)
    – inside this folder, create a “style.css” file .
    – at the very top of “style.Css” write something like :

    /*
    Theme Name:     My child theme
    Theme URI:
    Description:    Child theme based upon the discover theme
    Author:
    Author URI:
    Template:       discover
    Version:        0.1.0
    */
    @import url("../discover/style.css");

    In your “style.css”, you can override original discover styles

    you should be able to see your new child theme in the admin panel.

    – in your folder “my-child-theme”, you can copy any file from the original “discover” theme, and modify them as you like.

    This is where you will have your (copied) “element-boxes.php” , “”options.php “” …etc ….

    sorry for my bad english, i’m french 😉

    Thread Starter 7dezignz

    (@7dezignz)

    So am I. French that is. I found that changing my font size aligned the image boxes on the homepage. How could those be related. Weird.

    ok Hello !

    J’ai fait le test chez moi:
    – 8 boxes
    – .title-box h1 { font-size:2em …}

    et çà marche .

    N’aurais-tu pas ajouté quelque part un “display:block;” et/ou “width:100%” de “trop” ? …

    un lien peut-être ?

    Hi

    as I can separate the two lines of the 8 box?

    http://www.abservi.com

    Thanks.

    in your style.css, you may add something like this below :

    .box-head {
    margin-top : 1em
    }

    but this will also add a space right after the slider, before the very first row of 4 boxes…

    Thanks,

    “but this will also add a space right after the slider, before the very first row of 4 boxes…”

    is possible to solve?, thanks.

    yes of course, with some css still.
    but your page doesn’t look bad.

    Hi

    I am also trying to make the 4 extra boxes and really appreciate your guide above. I also made it work in the Discover Theme – but when I try to copy it to my shold theme style sheet it dosen’t work. Is that beacuse I can’t write php in the style sheet but should make a new php folder? or is there something I can write in the style sheet to make it read it?

    Sorry for interupting, I hope one of you can help me out. It will be much appreciated.

    My site log in headtest/headtest

    Thanks

    @banana13 : hello
    I think (but i’m not sure) that you forgot to adapt every (new) id for each box. “id ‘s” are unique you know….In another post i’ve tried to detail the process.

    Is that beacuse I can’t write php in the style sheet

    >>> no you can’t.

    but should make a new php folder?

    >>> neither. just copy IN your child-theme folder the original php file, then you can modify it . don’t forget to respect the original tree ,so, for “discover” theme : root.

    hope it can help

    Thank you for your advice. I forgot to say that I am working with ‘the one click child theme plugin’ – that dosent allow me to write in any other formats than the style sheet. I guess I need to manually make one and upload via ftp instead and then copy the php file into that?

    Also thanks on the advice with box ids. How can I then opload images into the boxes? Should I insert the links for them into the code? or how do I get around that?

    Once again thanks!

    i’m sorry but i don’t know the “one click child theme plugin”.
    i’m used to work my wordpress sites directly in the server….
    so i can’t help you there …

    Hi, I was wondering how can I make my text center alignment for my boxes?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Need to add 4 add'l image boxes to homepage. The default 4 is not enough.’ is closed to new replies.