3 Replies - 1018 Views - Last Post: 16 January 2011 - 04:20 AM

#1 WhiteFang  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 105
  • Joined: 20-April 08

Making a custom WP theme

Posted 15 January 2011 - 09:24 AM

I'm in the middle of making a custom wp theme for myself but think I'm going to need to learn some php to get what I want, I'm just not sure if what I want is doable. I'm sure it is, but I'll ask anyway.

I've got a layout in mind for my posts page. All my posts will have one image in them, in a set position. Would it be possible for example to write my post out in the admin control panel and wrap some custom tags around an image filepath I specify, and this image will get placed in that position? I assume this would be done in php? If so, is it easy to do?

Is This A Good Question/Topic? 0
  • +

Replies To: Making a custom WP theme

#2 andwilley  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 50
  • Joined: 18-June 09

Re: Making a custom WP theme

Posted 15 January 2011 - 10:02 AM

It depends on how you are putting the image into the post. If all you're looking to do is position your images in the same place for every post in which it appears, and you're adding the image via the standard upload feature in the admin backend, you can just style out the css class given to it by wordpress on upload. For example, if you upload an image and select align right in the wordpress uploader, the image appears in the post with the css class "alignright". This way, if all of your posts only have one image in them, you can just use css to get them where you want, and you don't have to know any PHP.

If you're developing your own theme, however, you will certainly have to know some php to do it. Fortunately, Wordpress is extremely well documented and the codex can be of great help in that regard. If you have any specific questions about custom theme development and manipulating Wordpress to your intended ends, let me know, I'm sure I can help.

If you're working with a custom theme, and wondering how to get your posts and their content into each specific page, the loop is a good place to start.
Was This Post Helpful? 2
  • +
  • -

#3 WhiteFang  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 1
  • View blog
  • Posts: 105
  • Joined: 20-April 08

Re: Making a custom WP theme

Posted 15 January 2011 - 10:12 AM

Ah! Would never have thought of that myself. I'll be sure to look into the loop, thanks very much for your help!
Was This Post Helpful? 0
  • +
  • -

#4 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 342
  • View blog
  • Posts: 1,286
  • Joined: 06-December 09

Re: Making a custom WP theme

Posted 16 January 2011 - 04:20 AM

It may be worth you looking into using Featured Image, which was a feature added in WP 3.0 (or possibly 2.9) to replace using custom fields which is often used for this kind of situation.
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1