• Resolved rasta_wdpr

    (@rasta_wdpr)


    Simple question, but maybe not so simple answer.

    I have a current HTML static page that I want to convert to WordPress.

    It has somewhat of a template it works off of. This is the page: http://www.mountainhighorganics.com/

    I would like to maintain the overall design. But here is the tricky part. I’d like to be able to edit the content in WordPress’s wysiwyg editor.

    I looked at a lot of youtube tutorials which all show promise… but nothing with the wysiwyg part.

    I looked at a few themes but there is just too much to look through to find one that matches.

    Any thoughts?

    -roy-

Viewing 15 replies - 1 through 15 (of 51 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    But here is the tricky part. I’d like to be able to edit the content in WordPress’s wysiwyg editor.

    The functionality sounds very doable, you can edit the content in WordPress’ editor for that page.

    I looked at a few themes but there is just too much to look through to find one that matches.

    Are you asking how to make an already-built theme look the same as your static website?

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    Are you asking how to make an already-built theme look the same as your static website?

    I don’t know… is this easier?

    The functionality sounds very doable, you can edit the content in WordPress’ editor for that page.

    can you explain this? i know what the editor is… but how would i have the menu in the same place? the graphic on the left, etc..

    Hey Rasta,

    You can easily do this with a Child Theme and some custom CSS, built on most free themes. Just takes some knowledge of CSS and a little skill.

    You can use any of the most popular themes here on wordpress.org such as Responsive, Sparkling, Customizr, Virtue etc. This way when you run into a problem and need suggestion when customizing your theme, you get the most help.

    Hope this helps!
    -Trey

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    could you explain the child theme idea a bit more? i don’t know if this the right thing.

    Hey,

    I am suggesting a child theme in order to get a WordPress theme to look just like your HTML website that you have now. Doing an actual conversion is a lot more work.

    You could first pick a free theme in the wordpress directory that has a similar layout as your current site. After installing the theme, create and activate a child theme for it. Here is how to do it: Child Themes

    After you activate your child theme, change the settings in the theme to get your site as close to the design that you want. Lastly, you can add custom CSS to your child theme to get the EXACT results that you are looking for. You can learn HTML and CSS for free over at codeacademy.com. 🙂

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    ok i just read this: child theme and i kind of have a better understanding of its purpose… and it would be helpful when I choose a theme to work/edit with.

    Still regarding the design of the site. How do I even begin to remake the site over in wordpress so its up datable?

    i’ve seen a few tutorials but nothing exact.

    Any comments suggestions?

    Did you code the original site yourself? That is, are you comfortable writing HTML & CSS? If so, I will offer a suggestion for a highly customizable theme that you can modify without creating a child theme, and still get the same overall look as the original. Montezuma is very different from other WordPress themes in that instead of relying on a limited set of theme options, you work with virtual templates and CSS files to generate the look you want. In your case, since your web site doesn’t have a blog page (yet), all you would need to do is modify the virtual page.php main template, and the header.php and footer.php sub-templates, to arrange the basic elements that you need, then modify the virtual CSS files to change the appearance of those elements. The theme supports a static layout, like your current site design, but it also supports a responsive layout, in case you want to eventually make your site mobile-friendly. You can take a look at the showcase thread in the BytesForAll support forum (the support forum for Montezuma) to get an idea as to how customizable the theme is.

    As far as being able to update the page contents, it would be done the same as any other WordPress theme: you go into the admin dashboard and create a new Page (Pages > Add New), and then create a menu item for that page by going to Appearance > Menus from your admin dashboard. Any time you want to update a particular page, you can do it from the admin dashboard through the Pages > All Pages option.

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    CrouchinBruin > this sounds exactly what I’m looking for…

    No I didn’t create the site myself…but I have been modifying and updating it. And yes I am comfortable with most HTML & CSS. ( not an expert)

    i’m looking at the theme now and wondering if i can just copy the already completed html/css code; as to where exactly not sure.

    I looked through the files in the montezuma folder and didn’t see any ‘virtual’ page.php , and main template.

    The updating section sounds perfect for what i’m looking for…

    I looked through the files in the montezuma folder and didn’t see any ‘virtual’ page.php , and main template.

    They’re called “virtual” templates & CSS files because they don’t exist as physical files. When you install the theme into WordPress, go to Appearance > Montezuma Options and you’ll see sections for CSS Files, Main Templates, and Sub Templates, with documentation at the beginning of each section. The virtual templates & CSS files get stored as database options, with the virtual CSS files also getting consolidated and written to a physical file called styles.css whenever the virtual CSS files are modified & saved.

    You’ll also want to read the documentation under Appearance > Montezuma Options > CSS Settings to understand how the 12-column grid system works (mostly important for a responsive layout) and Appearance > Montezuma Options > CSS Settings > Choose CSS Grid if you want to pick a non-responsive layout.

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    ahh that helped a lot. seems like a great flexible theme.

    anyway i can just copy my current code and paste it into the appropriate file?? only thing i don’t know which file to edit.

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    i’m working with this site: http://www.mountainhighorganics.com/

    can someone give me an example?

    i’m just not sure how to begin exactly, like which file…… i understand the concept though…

    Here’s a mock-up I threw together on my sandbox site as an example. It’s not perfect, but close enough so you can see that it’s fairly easy to modify the theme to get the look that you want. It took about 30 minutes to get the structure right by editing three virtual template files, then another hour to tweak the appearance with the virtual CSS files.

    So think of your site as being divided into three sections. The top section would be the header, and that would include things like the navigation menu, the company logo, the site title and description (if any), etc. This area is static, i.e., stays the same for all pages on your site. To replicate this section in Montezuma, I copied over the some of the HTML (i.e., the image tags and the top links, but not the menu code) over from your site’s source into the virtual header.php file. You want to leave the menu code out and use the function call that’s already in header.php that creates the menu.

    The bottom section is the footer, and contains your contact information, social media buttons, and copyright info. Again, this section is static across all pages. And again, I just copied some of the HTML from your site’s source into the footer.php sub-template.

    The middle section has the dynamic content (the page text), but it also has some static elements as well: the image to the left and the composite image at the top. This is where you would make changes to the page.php file, which is the main template that displays single pages. If you examine page.php, you’ll see that it brings in the header sub-template with a call to get_header right at the beginning of the file, and a call to get_footer at the end of the file to bring in the footer sub-template.

    You may recall from reading the documentation that the theme is based on a 12 column grid. What this means is that each section of the page will have a DIV with a class of row assigned to it that spans the entire width of the content area. With each row DIV there can be one or more “column” DIVs which are assigned a class name of col#, where <strong# is a number from 1 to 12, with each number representing a multiple of 80 pixels (80px). An element with a class of col1 will be 80px wide, an element with a class of col2 will be 160px wide, etc. The column elements are nested inside the row DIVs such that their column class # totals 12 (which represents 960px).

    For example, the default layout of page.php has a DIV with an ID of main that is assigned the class row, so the main will span across the entire width of the page. Nested within the main DIV is another DIV with an ID of content, and that DIV has a class of col8 assigned to it, meaning it will span 640px across the width of the page. After the content DIV is another DIV with an ID of widgetarea-one. A widget area is a place where you can install plugins that add functionality to your site. The widgetarea-one DIV has a class of col4, which is perfect because 8 + 4 = 12.

    What I did to modify the page.php page was to take out the widgetarea-one DIV at the bottom (since you don’t need any widgets right now) and create a new DIV at the top with an ID of divLeftPhoto (the same ID as is being used in the original site). I gave this DIV a class of col3, since the left image is 167px wide and widened the content DIV from col8 to col9 so the column elements still add up to 12. Inside the divLeftPhoto DIV I just copied & pasted the link and image tag from the original site. Inside the content DIV, I copied & pasted the image tag for that composite image from your site.

    So all of the above, with regards to modifying the virtual template files, is fairly straight-forward, you figure out what section (header, footer, or page) that an element goes into and copy it into there. The tricky part is determining what CSS to use to create the same look, because you’ll have to override the default appearance of the theme. That’s where learning to use a web debugging tool like Firebug (a free plugin for FireFox) or Chrome Developer Tools (comes built-in with Chrome) comes in handy, because you can see exactly what CSS rules are being applied to different elements on the original site and modify the selectors to override the corresponding rules on the Montezuma site. One tip regarding the virtual CSS files: instead of trying to search through all of the different CSS virtual files in order to find the rule to change, copy or create a new rule at the end of the various.css virtual file; since it gets loaded after all of the other virtual CSS files, rules written in there will override any previous rule with the same selectivity.

    Once you get all that done (i.e., the framework), it’s just a matter of copying over all your content into Pages. I also created a copy of your Resources page which you can access from the Mountain High menu item. It uses the same header.php, footer.php, and page.php files as the mock-up home page, but all I had to do was copy over the HTML into a new Page (oh, make sure when you create a page that you use the Text editor rather than the Visual editor, or your HTML tags will not be saved correctly).

    Whew, that’s enough for now. It’s probably somewhat overwhelming, especially since you have to learn how WordPress works as well, on top of trying to figure out the theme. Don’t be afraid to try different things, there’s always reset button at the bottom of all of the template and CSS files in case you muck things up (but make sure you use the thinner button to reset the options for just that page, instead of the Reset All button that will reset all of Montezuma’s options). If you have any specific questions, feel free to post.

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    @ CrouchinBruin >> Wow! thanks…let me read through your post…..

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    I already understand how WordPress works…i’m just not an expert.

    I am starting to understand your post, just have a few questions i’m trying to formulate here…

    So can I just editing those 3 sections and it will be a cross the board template? Like your example?

    —oops i just reread your post… and answered my question…

    Thread Starter rasta_wdpr

    (@rasta_wdpr)

    starting to shape up a bit….take a look : http://www.mountainhighorganics.com/mhoincdev/

    i have firebug, got a little lost with columns section…and the CSS section…

    How did you get the menus in?

Viewing 15 replies - 1 through 15 (of 51 total)
  • The topic ‘HTML to Worpress’ is closed to new replies.