CL 2013-11-12

My homemade template installed in WordPress. It contains of a “big” index.php with a lot wordpress loops to fetch sites and use it as a “section” in the page instead of independent sites (except of Changelog and Design). Loops are using to fetch posts and inset them as portfolio parts or writings parts.

  • It’s only the main site which need the video, then I’ve made a function in function.php with:

    and then I pull it to index.php using  get_trma_header();
  • To fetch pages from WordPress and use it as a section, I used the code (in index.php)

    It creates a loop, and only looks for a page with the ID ’57’ and fetch the title, subtitle (by using the plugin) and the content, and show it in the section.
  • I chose to use the categories to separate the posts in difference places in the site: Portfolio to the portfolio-section, Changelogs to the changelog-site and so on. In portfolio I am using tags to separate the projects in difference “sub-categories” as School, Web and Video. I used a php loop in the nav-bar in portfolio section to fetch all tags and show them (index.php)

    and then I post all portfolio posts which have an image by using a wordpress loop (By checking if they have a image attached to the post or not):