11 replies [Last post]
wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

Hey, I'm trying to get started using wordpress, trying to convert an existing xhtml site to work in wordpress by making it a theme and utilizing the pages feature but I'm having a HELL of a time just getting thinks linked up properly. Maybe someone can help explain? I've basically duplicated the sandbox theme to try and start from, but the other site had all the images, styles, scripts, etc. in a 'library' folder, and in trying to yank the base import stylesheet out to the root of the theme folder and rename it to be style.css nothing seems to be pointing to the correct place anymore and i'm getting a killer headache trying to figure out something so simple.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

You're assuming a lot of us

You're assuming a lot of us Smile

With that level of detail it's going to be next to impossible to really help and the aspects that will have to do with how WP needs to structure things proprietary in nature.

To be honest you would be better of asking the WP forums to help in getting things initially working and thereafter if there are CSS issues they might be better addressed here.

One thing to add, you say that you are trying to convert an existing layout and then state you are attempting to use the Sandbox? theme these two statements don't make sense together. If you have an existing layout then to make it work as a WP driven layout all you need to do is to drop the WP loop in at an appropriate point in your primary page layout, then call template tags such as get_sidebar() where you need them, this is of course a simplified example.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

i know. haha.. i just took

i know. haha.. i just took some excedrin... the wordpress forums never respond to my elementary bs. everyone just tells me to read the codex. everyone here is more reasonable and consistently more helpful than some of the other forums. i'll be back in 5 min with more info.

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

ok, so for starters, forget

ok, so for starters, forget what i said about the sandbox thing. i was only using that so i could see what files i should take into account. index, header, footer, etc. Now, I don't know what my problem is, but the only way I can get this theme thing to show up is if everything has a full absolute URL. It's driving me nutz. I'm used to keeping all my assets neatly organized in a library folder and now its like in some wp-content/themes/whatever folder with some bloginfo('stylesheet_url') called from the header.php file and 1 style.css file in the root of the theme folder. I'm working with a bunch of stylesheets and scripts here. What you're talking about with the loop thing seems pretty cool for the little news thing i want to have on the homepage... i want like 3 posts... i tried adding this

<h5 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h5>
				<h6 class="date-box"><span class="date"><span class="date-month"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></span></h6>
				<p><?php the_content('Read the rest of this entry &raquo;'); ?></p>

and it definitely pulled 1 item but i can't figure out how to get it to add multiple posts. I don't know, maybe you guys can't help me. My design doesn't exactly conform to the standard header footer sidebar thing, but i've got it coded out neatly in xhtml ready to integrate into wordpress and didnt realiez it would be this complex.

jackR
jackR's picture
Offline
Regular
Denver
Last seen: 4 years 12 weeks ago
Denver
Timezone: GMT-6
Joined: 2009-04-13
Posts: 44
Points: 46

How well do you know PHP?

How well do you know PHP? You will need to be familiar with it to make many functionality changes. Now the style sheet to are referring to works well for controlling the layout of the site. When I have converted sites to a WP site, I work to find a theme that closely resembles the site I am converting then make my changes through the CSS and the XHTML. I have not had perfect results, but it has worked well for me. You might just have to change your design a bit to get it to work.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 4 years 40 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

That's not a loop though; a

That's not a loop though; a loop is called that because it's a query loop it loops over the posts until there are no more to show, it looks like this or thereabouts depending on what you want:

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
 
 
<div <?php post_class(); ?>>
   <h2><?php //the_ID(); print ':'; ?><a  href="<?php the_permalink() ?>" rel="bookmark"><?php the_title($before = '', $after = ''); ?></a><?php permalink_anchor(); ?></h2>
    <p class="post-date">Posted:&nbsp; <?php the_weekday(); ?>&nbsp;<?php the_time('F j, Y'); ?></p>
 
    <div class="post-body clearfix">
      <?php the_content(__('(more...)')); ?>
    </div><!-- close post-body -->
     <p class="filed_under"><?php _e("cat:"); ?> <?php the_category(',') ?> </p>
   <p class="feedback"><?php wp_link_pages(); ?>
   <?php comments_popup_link(__('No Comments'), __('Comments (1)'), __('Comments (%)'),'jjkkjj'); ?></p>
    <?php //trackback_rdf(); ?>
 
</div><!-- close post --> 
 
 
<?php comments_template(); // Get wp-comments.php template ?>
 
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>

If you study the default kubrick theme you will get an idea of the various template tags, and sadly it's true you do need to read the Codex for detail on how to implement template tags and functions and what parameters they can pass.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

sticks464
Offline
Enthusiast
Topeka, KS.
Last seen: 7 years 46 weeks ago
Topeka, KS.
Timezone: GMT-6
Joined: 2006-10-18
Posts: 116
Points: 71

You can give this tutorial

You can give this tutorial series a try. It walks you through converting to wordpress and gaining an understanding of php.

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

thanks, but can someone

thanks, but can someone explain why a lot of agency sites like big spaceship that are moving towards wordpress use complete absolute urls for all links to their theme stuff? with http://www.etc...??? also, i really don't want to have a style.css file in the root directory of the theme folder... am i stuck with that? i like to shuv all my style stuff in a css folder or somethin

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

ah, that link was pretty

ah, that link was pretty useful. i got this working...

<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
					<h5><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
					<h6 class="date-box"><span class="date"><span class="date-month"><?php the_time('F') ?></span><span class="date-num"><?php the_time('jS') ?></span></span></h6>
					<?php the_content(); ?>
				<?php endwhile; ?>
				<?php endif; ?>

is there a way to get it so the 13th just reads 13 and April and December just read Apr and Dec? also, how can I limit the number of posts in the loop to 3? Also, i got osme link lists working

<h6>Printing</h6>
				<ul class="inline-list">
					<?php wp_list_bookmarks('title_li=&categorize=0&category=3'); ?>
				</ul>
but am wondering rather than having Printing being static in an H6 tag how to get the link category be in the h6 tag? If you guys think i'm a moron just let me know. I'm reading the codex but am a slow learner with this stuff. Oh yea, say I wanted posts displayed outside of the main news flow like for a sub page or something... just like 1 post with a heading and few paragraphs of text.... how would I go about hooking that up?

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

great. now someone has me

great. now someone has me looking at joomla... ahhhhhhhh!!!!!!!

Deuce
Deuce's picture
Offline
Guru
Somewhere, USA
Last seen: 2 years 13 weeks ago
Somewhere, USA
Timezone: GMT-5
Joined: 2005-11-20
Posts: 4424
Points: 1843

wyclef wrote:great. now

wyclef wrote:

great. now someone has me looking at joomla... ahhhhhhhh!!!!!!!

You probably don't want to hear it, but your best bet might be to hire a professional who knows one of these systems inside and out.

all ยป http://dictionary.reference.com/browse/all

Google isn't a bunch of guys reading and grading web sites, it's more like a bunch of monkeys sniffing food and putting the good bananas at the top. -Triumph

wyclef
wyclef's picture
Offline
Regular
Last seen: 1 year 20 weeks ago
Timezone: GMT-4
Joined: 2004-01-21
Posts: 48
Points: 26

nah, i'm gonna push through

nah, i'm gonna push through this. i've made some progress. i need to get the hang of using custom fields... am having a hard time. mebbe someone can help? i'm thinking i want to set up several different page templates for some of the different pages i'm making, and then using custom fields for the varying bits of content... but i'm having trouble getting a simple 'fine_print' field with some text content as the value to show up on my page. this is what i've got so far... nothing shows up...

<?php if (get_post_meta($post->ID, 'fine_print', true))
{ ?> 
<p><?php echo get_post_meta($post->ID,
'fine_print', true); ?></p> 
<?php } ?>

what am i doing wrong? do custom fields only work with posts and not pages? also, i'm trying to use list pages to make a little list in the footer of my nav, because i'm thinking i'm gonna hard code the nav list in the header cuz it's just a background image. I've basically got it working but am wondering how I can insert a little html entity before the links like in the home part...

<ul>
 
 
						<li>&rsaquo; <a href="<?php bloginfo('url'); ?>">Home</a></li>
						<?php wp_list_pages('title_li='); ?>
 
					</ul>