template/wordpress/index.php in edge_framework-0.10.0 vs template/wordpress/index.php in edge_framework-1.0.0
- old
+ new
@@ -1,57 +1,14 @@
<?php
-/* ----------------------
- Home / Landing page
----------------------- */
-get_header();
-
-// Get list of all categories
-$args = array(
- "child_of" => 0,
- "hide_empty" => false,
-);
-$categories = get_categories($args);
-
-// Get list of all pages
-$page_args = array(
- "child_of" => 0,
- "sort_order" => "ASC",
- "sort_column" => "post_title",
-);
-$pages = get_pages($args);
+ $posts = Post::find();
?>
-<p><small>index.php</small></p>
+<div class="row">
+ <div class="large-6 column large-centered">
+ <?php if($posts->have_posts() ): while($posts->have_posts() ): $posts->the_post(); ?>
-<h1>Welcome to <?php bloginfo("name"); ?></h1>
+ <h1><?php the_title(); ?></h1>
+ <?php the_content(); ?>
-<h3>Category</h3>
-<ul>
- <?php foreach ($categories as $category): ?>
- <li>
- <a href="<?php echo get_category_link( $category->ID ); ?> ">
- <?php echo $category->name; ?>
- </a>
- </li>
- <?php endforeach; ?>
-</ul>
-
-<h3>Pages</h3>
-<ul>
- <?php foreach ($pages as $page): ?>
- <li>
- <a href="<?php echo get_page_link( $page->ID ); ?>">
- <?php echo $page->post_title; ?>
- </a>
- </li>
- <?php endforeach; ?>
-</ul>
-
-<!-- How to get Page content outside "page" template -->
-<h3>About Us</h3>
-<?php
- $page = get_page_by_title("About Us");
- $content = apply_filters("the_content", $page->post_content);
- echo $content;
-?>
-
-<?php get_footer(); ?>
+ <?php endwhile; endif; ?>
+ </div>
+</div>
\ No newline at end of file