jdunneirl
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Best Practice for Storing Datasorry typo, places on the one page i mean
Forum: Themes and Templates
In reply to: Best Practice for Storing DataThanks 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 postsForum: Themes and Templates
In reply to: Best Practice for Storing Dataok,
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
Forum: Themes and Templates
In reply to: Best Practice for Storing DataOK, how do I apply a post to a page / read it back from that page so?
Now I am lost ??
Forum: Themes and Templates
In reply to: Best Practice for Storing DataSounds 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?
Forum: Themes and Templates
In reply to: Best Practice for Storing DataThanks 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
Forum: Fixing WordPress
In reply to: Newbie and wp_list_pagesThank you so much for your help,
Its working perfectly now, I am guessing this was a common enough error?
So in summary, what you done was take the pages array explode it, take the elements i need and disregard the rest, I think what I was doing was trying to keep the format that was returned and it messed up
Thanks again for your help
John
Forum: Fixing WordPress
In reply to: Newbie and wp_list_pagesbasically, I dont know wordpress and as a project to learn it i was given an existing sites mark up to convert to wordpress, the css for the navigation focuses around the targeting of elements inside the strong tag,
Here is the css I need it to obey
Access key will change but can be in sequance, 1 – 6
#nav { float: right; list-style: none; margin: 0; padding: 0; } #nav li { float: left; margin-right: 1px; font-family: Impact, Charcoal, sans-serif; font-size: 1.8em; } #nav li a { display: block; color: #fff; text-decoration: none; padding-right: 4px; background: url(images/menu-bcg.png) 100% 0 no-repeat; text-transform: uppercase; } #nav li a strong { display: block; padding: 0 6px 0 10px; line-height: 30px; font-weight: normal; background: url(images/menu-bcg.png) 0 0 no-repeat; } #nav li a:hover, #nav li a.active { background-position: 100% -30px; border: 0px solid #000; } #nav li a:hover strong, #nav li a.active strong { background-position: 0 -30px; } #nav li em { position: absolute; left: -10001px; top: -10001px; }
Thanks again for the help
John
Forum: Fixing WordPress
In reply to: Newbie and wp_list_pagesPerhaps i am going the wrong way about what I am trying to do,
I have a list of pages in wordpress and i wish to make a navigation bar out of them, the navigation needs to look like this,
<li><a href="./" accesskey="2"><strong>About us</strong></a><em> [2]</em></li>
The code above is an adaptation of
https://www.wantusiak.com/wordpress/wordpress-modify-wp_list_pages
Sorry again if this is really obvious, and thanks for the help
<?php $my_pages = wp_list_pages('echo=0&title_li=&depth=1'); $pieces = explode('"', $my_pages); $i = 6; $j = 5; $limit = count($pieces); for (;$i<$limit;) { $tmp1 = '><strong>'.$pieces[$j].'</strong></a></li>'; $pieces[$i] = $tmp1; $i = $i+6; $j = $j+6; } $tmp2 = implode('"',$pieces); echo $tmp2; // echo "<!--".$tmp2."-->"; ?> </ul>
John
Forum: Fixing WordPress
In reply to: Newbie and wp_list_pages<li><a href="./" accesskey="2"><strong>About us</strong></a><em> [2]</em></li>
Is what that look likes