WordPress.org

Ready to get started?Download WordPress

Forums

Easy way to drag and drop/ add php includes for theming (3 posts)

  1. design_dolphin
    Member
    Posted 5 years ago #

    Is there a php software program or technique which allows drag and dropping or easy adding of 'includes'?

    Ít would make theming a lot quicker.

    Many thanx. :-)

  2. whooami
    Member
    Posted 5 years ago #

    Is there a php software program or technique which allows drag and dropping or easy adding of 'includes'?

    sure, its called typing :

    <?php include 'vars.php'; ?>

    i'm pretty confident that I cant type that out before you can use a makeshift file browser and flimsy gui.

  3. design_dolphin
    Member
    Posted 5 years ago #

    Thank you for posting. I will check that out.

    I had set up a routing myself, before you mentioned this, only to find out that it influenced the time in which it took to load pages (mind you were talking tenths of seconds, but nonetheless) So that is why I started to code the includes manually. Also determining the focus point on when to load and avoid duplicate calls was something that had to be solved.

    The theme is a MVC framework theme. Which is great once it is set up. It saves a lot of time in the sense of organisation. By the way one thing I discovered (in 2.7) with the normal template files:

    For example

    category-6.php
    category-7.php

    Is that if you export the blog posts using the export function and reimport the blog posts, the categories in my case had different numbers which meant a category and numbered template files would no longer line up. Not sure what would be a solution for that with a normal theme. Using MVC you can use the category.php for example using conditionial tags to route to the necessary controllers and models for different categories. And in this it allows you to use the category name using the built in category recognisition. I can understand the categories being given new numbers when doing an export import. But maybe a function on import that would say "if the category number does not exist keep the original category number; if the category number does exist give it a new category number"

    I haven't figured out how to do includes in any software so far. Dreamweaver, does something like this when you move files, but mucks up the paths a lot of times when doing so. It is for me just setting up php paths I find a waste of time, because I am losing a lot of time hunting the paths down. In that sense the built in 'controllers' in WordPress such as category.php are fantastic. I really love the way the theming and the structure behind it is set-up, it makes designing and building themes fun. Designing in WordPress puts a smile on your face.
    Especially once I learned how to write my own queries, it is just a dream to work with.

Topic Closed

This topic has been closed to new replies.

About this Topic