treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Wordpress CMS Question

  • I know this video is old but I loved how this guy made his website look exactly how it was supposed to in the visual editor by creating a page template a pasting in his HTML code.

    Is this still the recommened method to use Wordpress as a CMS? I'm a newbie when it comes to wordpress. This guy is using tables... could you use a stylesheet inside with the visual/html editors in Wordpress?

    What are some great resources for this?

  • Do you mean a stylesheet or inline-styling? You can attach a stylesheet in the header of Wordpress but not in the html editor as that is where you place your body content.

  • I meaning a stylesheet. I thought you could do it through the header.php. Is this the best way to handle wordpress as a CMS for a client perspective?.... or is it bad because they could mess up something in the HTML?

  • You can. That's what I mean by the header of Wordpress. I should have said the head section. For a client, they should only be posting in the visual editor.

    However, if you're putting the content in for them, then you should do the same by placing the content inside the visual editor so if they wanted to make simple changes, they can.

  • I pasted my HTML into the HTML Editor in the Wordpress Dashboard->Pages.

    The visual side's links are broken and isn't picking up any of my styles. How can I make the visual part look more like the page?

  • Ok so you can't paste PHP code into the wordpress HTML editor. So how do you link to an image???? I tried doing it statically but the paths were still broken.

  • Above the editor, there's a button you can click to upload images. There will be an option to insert the image into the editor.

    P.S. You don't need to create template pages for each page of a website like the video suggests. Usually template pages are used when the page is unique from the other pages on the site. If all the pages will use the same styling, you wouldn't need a custom template page, you could use the standard page.php file to style all the pages.

  • You might also want to check out Chris's video about Wordpress.

    http://css-tricks.com/video-screencasts/25-designing-for-wordpress-part-one/

  • Thanks for the help!! I'm trying to modify my page.php file but it comes up blank...

    Here's my code:

      <?php
    

    get_header(); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post();?>
    

    <?php if(is_front_page()) { <div class="grid_16 slider">

    } ?>
      <?php the_content(); ?>
    <?php endwhile; endif; ?>
    
    <?php get_footer(); ?>