• My site is mostly static pages (for now), but I would still like to make the content very user-friendly to manage so that I can pass the site off to a non-technical user when finished.

    My dilemma is that the 10 or so core pages that I’m planning for right now include a few different design elements on each of them. I could style them easily through the WP Admin menu by adding the HTML markup directly onto the Page (via the “HTML” tab). However, my main concern would be end-users needing to interact with some HTML code to update content in the future.

    My other option is to be creative with asking users to create separate Pages or Posts with specific titles (or identifying custom fields, taxonomies, etc.), and I can use the loop/queries to pull & style relevant content into the right places on each page. While this would isolate the content in the admin panel (no HTML), my major concern would be the rigidity of design in case pages ever need to be expanded (and the dependency risks you introduce).

    I’ve seen tutorials recommending to put HTML markup directly into WP pages (Tables, Headings, Twitter Bootstrap elements, etc.); I’ve also seen ones recommending the complete isolation of content for ease of end-user mgmt.

    Anyone have any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter WordPressIsAwesome

    (@wordpressisawesome)

    I knew I saw something for this before… upon more digging, it looks like my answer may be Short Codes?

    My dilemma is that the 10 or so core pages that I’m planning for right now include a few different design elements on each of them. I could style them easily through the WP Admin menu by adding the HTML markup directly onto the Page (via the “HTML” tab). However, my main concern would be end-users needing to interact with some HTML code to update content in the future.

    The output of the visual/html editor is only what displays when a template file calls the_content() or get_the_content(). For full control you need to edit the template file directly.

    My other option is to be creative with asking users to create separate Pages or Posts with specific titles (or identifying custom fields, taxonomies, etc.), and I can use the loop/queries to pull & style relevant content into the right places on each page

    Just use different templates for pages. For posts I’m assuming you’re going to separating your posts by category, so loop that category specifically in a template file, set a page to that template and link to that page in menus rather than the category itself to control detailed styling for a specific cat.

    In regards to scalability, it’s most important to follow standard conventions and comment your code. Both allow your thought process to be understood by another developer.

    I’ve seen tutorials recommending to put HTML markup directly into WP pages (Tables, Headings, Twitter Bootstrap elements, etc.); I’ve also seen ones recommending the complete isolation of content for ease of end-user mgmt.

    Depending on whether or not the site is going to have an experienced administrator who is comfortable with html. If not, I would say that that then yes, the content should be separated. That doesn’t mean that their cannot be html/inline styles/whatever in the generated content, but it should be kept to a minimum and should be post/page specific.

    I knew I saw something for this before… upon more digging, it looks like my answer may be Short Codes?

    Yes, short codes are great. Just make sure you provide some documentation on the ones specifically you’re going to explain to your clients. Non-technical users will not have a reference of what [one_column] does in terms of html/css and will not understand why text doesn’t automagically wrap around a picture, or whatever.

    Thread Starter WordPressIsAwesome

    (@wordpressisawesome)

    Thanks for the thorough and quick response. I think my inclusion of the “Posts” concept may have been misleading – I’m building most pages using “Pages” right now. I simply didn’t want to create multiple Page Templates for small structural/stylistic changes from page to page… and I also didn’t want to make the individual Theme files too complex and dependent on expecting specific content.

    I think for now my answer will be shortcodes to insert a graphic or two, or columns, or tables, etc.

    Thanks again for the reply.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using HTML Markup in WordPress Pages?’ is closed to new replies.