• Resolved jdunneirl

    (@jdunneirl)


    Hi guys,

    I am seeking some advice on the development of my first wordpress site,

    The state of play at the moment is I have my home page and sub pages all done in hard coded html

    I am not up against the age old of question of where to store stuff… I know the database duh… ??

    <div class="secondary-a">
    								<h2 class="header-resources">Online advertsing</h2>
    								<ul class="list-b">
    									<li>Banner</li>
    									<li>Richmedia</li>
    									<li>Interactives</li>
    									<li>Videos</li>
    									<li>Email marketing</li>
    								</ul>
    							</div>

    Through out the site I have data such as news feeds and random chunks of text, and lists, my question is where do I store this, I am guessing they all go in the posts section and I create a category for each page in my site?

    If this is correct, I assume that I get the values and use “the-loop” to display the data.

    This all seems logical however, when examining a theme I downloaded it stored most of its values using,
    update_option("ptthemes_frontpage_button_link2",'#')

    and display it likewise?

    So one totally confused newbie here ??

    Any advice would be a great help

    Thanks so much

    John

Viewing 15 replies - 1 through 15 (of 21 total)
  • You don’t need any Theme options. Simply add Posts and Pages to hold your content.

    Thread Starter jdunneirl

    (@jdunneirl)

    Thanks Chip,

    I know this might sound stupid / lazy but emm how ??

    I know how to add a page / a post and I know there are a heap of ways of getting the values back, getblog etc,

    What the best way

    Some code / a direction to go would be great just had a long day of wrestling with this and still unsure

    Thanks you so much for your help / guidance

    John

    I’m not entirely sure about what you’re asking.

    The best thing to do would be to build out the content of your site using a good Theme (such as the default Theme, TwentyTen), and then worry about building a custom Theme.

    That way, you can get a better idea about the interrelationship between your data, and how Themes display those data.

    Thread Starter jdunneirl

    (@jdunneirl)

    Sounds good Chip, I have the following now working,
    `
    <?php if(have_posts()) : ?>
    <?php while(have_posts()) : the_post() ?>

    <?php the_content(); ?>

    <?php endwhile; else : ?>

    no posts

    <?php endif; ?>

    This displays the text which is on the “page” however I need to get access to the posts / categories,

    For example I have made a category called home, which I plan on putting all the data for the home page in. Does this make sense?

    Pages and Categories do not mix. Pages do not have Categories. The “Category” taxonomy applies only to Posts.

    Thread Starter jdunneirl

    (@jdunneirl)

    OK, how do I apply a post to a page / read it back from that page so?

    Now I am lost ??

    What do you mean by, “apply a post to a page / read it back from that poage”?

    “Pages” and “Posts” are two separate types of content.

    Posts are output on the Posts index page.

    Pages are output stand-alone.

    In a normal setup:
    Posts are output on SITEURL/index.php
    Pages are output SITEURL/<pagename>

    Thread Starter jdunneirl

    (@jdunneirl)

    ok,

    so I have a number of html pages to be converted to work press, all content needs to be editable,

    so if i have for example 5 pieces of text to be tied and displayed on this page, what is the best way to display / store it.

    I add a post and read the posts in to my page no?

    I have one piece of content coming in which is what i entered in word press on the page section, ie home and then some text below it,

    This is the main text I have displaying.

    Now I need to get some more text, for other sections of this page

    Hope this make sense

    I’m sorry; it’s not making complete sense.

    Do you have a live version of your static HTML site, for reference?

    Thread Starter jdunneirl

    (@jdunneirl)

    Thanks for your patiences,

    OK, I ll make it basic, and keep it simple ??

    lets say I have one page…

    it needs to have dynamic text in 5 pages.

    Where do I store the text?

    I have the page created and displaying as my homepage, all works fine,

    text 1 my main text is displaying correctly as it is part of the page called “home” in wordpress.

    I have used this code to display it.

    <?php if(have_posts()) : ?>
    			<?php while(have_posts()) : the_post() ?>
    
               		<?php the_content(); ?>
    
                <?php endwhile; else : ?>
    
                       no posts
    
            <?php endif; ?>

    Where do I go from here, its my understanding that I store my data the posts section and then read these posts in to the page in sections,

    for example

    text 1 — comes from page
    text 2 — guessing comes from posts
    text 3 — guessing comes from posts
    text 4 — guessing comes from posts
    text 5 — guessing comes from posts

    This is what I’m not understanding:

    lets say I have one page…

    it needs to have dynamic text in 5 pages.

    What do you mean by “dynamic text in 5 pages”?

    Thread Starter jdunneirl

    (@jdunneirl)

    sorry typo, places on the one page i mean

    Okay, so:

    1) Do you have a live example of what you want to see?

    2) Do you need ALL Pages to look like what you’re describing, or just the home page?

    Thread Starter jdunneirl

    (@jdunneirl)

    all pages look the same for now, no live site sorry ??

    however I can put one up somewhere if we really need it

    Okay, so if you want all of your Pages to look the same, do you want the same dynamic content on all of your Pages, or will that dynamic content change depending on the Page?

    If all of the “dynamic content” will be the same on every Page, then the best solution is probably to add a Widgetized sidebar area to display beneath the Page content. You can then add Text Widgets (or other types of Widgets, as appropriate) to this area. These Widgets can be used to hold this “dynamic content”.

    But, to know if this is a viable solution, I need to have a better idea of what kind of content you want in these “dynamic content” areas.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Best Practice for Storing Data’ is closed to new replies.