• I thought to myself, “hey, you’re having all these problems with your layout, just do as you advise others and find a theme that matches the look you want and then modify it to be your own.” This is all good, but there are Theme Authors out there who are adding modules and changing some basic structure things and I’m confused.

    Kubrick calls for the header and then has the Loop in the index.php which allows you to modify if you want to see the whole post in the main page or an excerpt in an IF/ELSE statement. When you click on the link to the post, it calls upon the IF/ELSE statement to show the single.php with the post.

    In another theme I’m looking at, it doesn’t seem to allow you to do an excerpt at all, just the whole post. So I think it will be easy to just change the Loop. No doing. There isn’t a “Loop” as I’m used to seeing in Kubrick and others. It just calls for the post.php file, something new to me, and then does stuff from there. I thought this might replace the single.php, but it doesn’t.

    Let’s see if I can explain it right. The index lists this:

    <?php if ($posts) { ?>
    <?php foreach ($posts as $post) : start_wp(); ?>
    <?php require('post.php');?>
    <?php endforeach; ?>

    There is no option for single.php or excerpt because there is no <?php the_content(); ?>. That sits in the post.php but there is no clear loop with options other than “if it ain’t there, go to page not found”.

    The single.php looks like the index.php, with all the doctype, head info and everything, but it also features the require post.php.

    Where did the Loop go that includes the content?

    Now, I’m not saying that this author is right or wrong. I just want to know where the parts and pieces are.

    The template I’m referring to that has the different structure is No Limits.

Viewing 8 replies - 16 through 23 (of 23 total)
  • And ideally to do it by the personal example of the code you unleash on the community. Not by preaching.

    I think Kaf and Root have summed it up for me, as someone who doesn’t know his id from his class (ok I lie, I know) I am always in the process of learning and I can only learn from what others offer for knowledge. If there are examples of themes to adhere to, in terms of coding and structure then point them out. I’ve tried messing around with Manji at first, but found it difficult because I didn’t understand anything of what I was doing. Having worked with simpler themes, I understand it better and feel I can make a better example than my previous efforts.

    Kubrick on the other hand I find much more difficult, this I would say is not one of the better examples. Don’t shoot me down here, I’m just saying as someone who’s learning and trying to understand, Kubrick does things quite differently some of which confuses me at times, where as other themes seem to follow a more structured, and generic flow where learning the theme and understanding the css is a much more rewarding experience.

    One of the best examples is probably the original WP theme which has been “relegated” to classic status rather than default. It’s nice to have an out of the box site that looks great immediately, but when it comes to messing with it, it’s hard work and there aren’t any guides on how to do it (unlike Podz excellent classic tutorial).

    If you have knowledge or information to share, pointers to make and standards you wish others to implement lead by example and teach others. If you decide it’s easier to preach and not teach, you won’t encourage anyone to follow any example but their own.

    What I liked about the Your WordPress area is that people are kind enough to actually check the validation for your site! This is has become almost instinctive for many userz to check the validation of a site before commmenting. I don’t know if this is down to being pedantic, or simply trying to help, either way this sort of encouragement and pointer is invaluable to helping users understand why validating and managing their code will help ease any questions they will receive on why x doesn’t work when you change y.

    As a theme developer, I absolutely reserve the right to make themes that are based neither on Kubrick nor Classic, and to innovate in terms of which templates I include and how I structure them. Otherwise I might as well just stick to stylesheets.

    As for plugins, if the designer is willing to deal with the extra support requests their inclusion will draw, why not? I can easily see why a theme author might want to use something like Image Headlines or Recent Comments, and I don’t really see anything wrong with that as long as they provide adequate documentation.

    Thread Starter Lorelle

    (@lorelle)

    Okay, so tell me this, IF someone includes plugins in their theme, does the theme automatically “plug them in” or does/should the documentation clearly state that the user has to plug these in if they want the plugins to work.

    And what if they don’t? When there is plugin code inside of my files and the plugin isn’t activated, I often get all kinds of errors. I’m curious how those who want to offer up plugins as part of their Themes deal with these issues. It might help others who want to include them.

    That’s poor planning on the part of the theme developer/designer/coder. There’s a simple funciton in PHP, I think it’s called function_found() and you pass it the name of a function (presumably in this case the plugin’s function) and it returns True if the funciton is found (plugin installed and activated) or False if it is not (plugin in not installed and/or activated). Then and only then should the plugin be called. It’s just me, but I personaly think that’s the best way to go. Especialy if you plan to release it on the unsuspecting public at large. And it can also save your own sanity at a later time when (for what ever reason) you need to turn off a plugin.

    Tg

    Certainly – I agree with Tech. Including a plug in is only as hazardous as insatalling it in isolation. Yes it needs coding properly. Yes it needs instructions. Yes it needs – hopefully – the user to follow them. I would hazard a guess that themes with plugins are going to big in WP. There are good reasons for that.

    So – for someone who is just getting their teeth into php and knows a bit of CSS and who knows HTML really well, where would you people suggest the best place is to start if you want to learn how to design themes and there are no standard guidelines in the way that you get when you start HTML with things to do and not to do? Is the best way to learn how to design themes just starting to hack into the code and play around with it? I’m also wondering now that I have a much better idea of how the php files work together whether it’s a good idea to start learning to use php.

    I am beginning to visualise this as 3 levels. We can do style sheet only designs, we can do new templates or we can rewrite the core php files in themes. There are a lot of good resources but where to get started ? Heck just start doing what you like doing. Good luck and welcome.

Viewing 8 replies - 16 through 23 (of 23 total)

The topic ‘Theme Authors Adding Modules’ is closed to new replies.