WordPress.org

Support

Support » Requests and Feedback » Frustration with WordPress Template Tags

Frustration with WordPress Template Tags

  • socialENIGMA
    Member

    @socialenigma

    I want to emphasize here, first, that there is a lot I like about WordPress. That is why I’ve chosen to use it to power a new blog at an old domain of mine (referenced in my profile). I haven’t had a blog there for years, but now that I’m effectively finished with grad school I’d like to again. I think that WordPress is the most feature rich among blogging platforms. I was excited to learn about about WordPress features like Post Formats that fix situation that I used to have to hack together solutions for.

    I’m not posting this simply to complain. I hope that by communicating my frustrations this otherwise fantastic software might be improved, or that someone might offer a solution to my problem.

    I consider myself adept at HTML and CSS. I don’t “know” any programming or scripting language, but can read code and modify it slightly, especially in languages that use a C-like syntax.

    Now for my frustrations: WordPress template tags suck. I’ve spent that last several days developing my own theme. I began with a framework theme and stripped it down. My goal has been to have minimalist semantic HTML5 markup output that is easy to style with CSS. During development I became frustrated by the inconsistent parameter syntaxes. I had to look up every tag I wanted to use. Not only are there three ways to pass parameters to a tag–PHP-style, query-string-style, and arrays–but also tags that do very similar things such as “the_category” and “the_tags” have different parameter sets. “The_category” doesn’t accept $before or &after parameters, but “the_tags” does. Also, the former is singular and the latter plural–why?

    Again, I’m not trying to nitpick above, just trying to illustrate why someone who is otherwise comfortable with web development, might be frustrated by WordPress templates.

    Today, I uploaded my templates to my server and activated the theme. To my surprise WP tags output all sorts of extraneous code. Among many issues, I noticed that the “ul” tags output by wp_nav_menu have the class “menu.” Not only do I not want those elements to have a class, but that class is so commonly used in web design that it seems it would be likely conflict with a class one might add to an element somewhere else. I understand that I can fix this using that tag’s array style parameters, but I don’t think I should have to. If a designer wants a class they should be able to add it to outputted elements, yes, but why include it by default? Another thing that bothers me is all the code that wp_head outputs. I don’t want visitors to know what version of WordPress I’m using. It seems like that’s just asking for a hacker to take advantage of a vulnerability should one exist that isn’t yet known.

    So I have several questions for the development community: 1) Are there any plans for more consistent template tag parameter passing? 2) What is the rational behind having template tags output so many classes by default? and 3) is there a script or something I can put in functions.php to make all template tags output “clean” html?

    Thanks. I do think you have a great CMS overall, I’m just frustrated with what I mentioned above.

  • The topic ‘Frustration with WordPress Template Tags’ is closed to new replies.