-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhome.php
More file actions
207 lines (153 loc) · 6.65 KB
/
home.php
File metadata and controls
207 lines (153 loc) · 6.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?php
/*
Template Name: AppifyWP Homepage
*/
?>
<?php
global $options;
foreach ($options as $value) {
if (isset($value['id']) && get_option( $value['id'] ) === FALSE && isset($value['std'])) {
$$value['id'] = $value['std'];
}
elseif (isset($value['id'])) { $$value['id'] = get_option( $value['id'] ); }
}
?>
<?php
$whichmenu = '';
?>
<?php get_header(); ?>
<a name="top"></a>
<div class="content-wrapper" id="scrollable">
<div id="ios-scroll">
<div class="main-slideshow">
<?php if ($apfy_iphone || $apfy_ipad || $apfy_android || $apfy_macApp || $apfy_pc || $apfy_wp7 || $apfy_blackberry) { ?>
<?php if ($apfy_iphone) { ?>
<?php include (TEMPLATEPATH . '/template_iphone.php'); ?>
<?php } ?>
<?php if ($apfy_ipad) { ?>
<?php include (TEMPLATEPATH . '/template_ipad.php'); ?>
<?php } ?>
<?php if ($apfy_macApp) { ?>
<?php include (TEMPLATEPATH . '/template_mac_app.php'); ?>
<?php } ?>
<?php if ($apfy_android) { ?>
<?php include (TEMPLATEPATH . '/template_android.php'); ?>
<?php } ?>
<?php if ($apfy_pc) { ?>
<?php include (TEMPLATEPATH . '/template_pc.php'); ?>
<?php } ?>
<?php if ($apfy_wp7) { ?>
<?php include (TEMPLATEPATH . '/template_wp7.php'); ?>
<?php } ?>
<?php if ($apfy_blackberry) { ?>
<?php include (TEMPLATEPATH . '/template_blackberry.php'); ?>
<?php } ?>
<?php } else { ?>
<?php include (TEMPLATEPATH . '/template_iphone.php'); ?>
<?php } ?>
</div><!-- end main-slideshow -->
<div class="content" role="main">
<div class="wide-column">
<?php if(has_nav_menu('primary')){ ?>
<?php
$list=wp_nav_menu( array(
'container_class' => 'pagestoload',
'theme_location' => 'primary',
'echo' => FALSE,
'walker' => new pages_from_nav()
) );
$list2 = str_replace(array("\n", "\r", "\t", " ", "\o", "\xOB"), '', $list);
$list2 = strip_tags($list2);
$list2 = substr_replace($list2 ,"",-1);
$pieces = explode(",", $list2);
?>
<?php
query_posts(array(
'post__in' => $pieces,
'post_type' => 'any',
'Post_status' => 'publish',
'orderby' => 'post__in'
));
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post();
$pageslug = toAscii(get_the_title(), "-");
if ($pageslug == ''){
$pageslug = get_the_id();
}
?>
<div class="section post-<?php the_ID(); ?>" id="<?php echo $pageslug ?>">
<div class="entry-content">
<?php the_title('<h2>', '</h2>'); ?>
<?php edit_post_link( __( 'Edit', 'Appify' ), '<span class="edit-link">', '</span>' ); ?>
<?php the_content(); ?>
<?php global $wp_query; $template_name = get_post_meta( $wp_query->post->ID, '_wp_page_template', true ); ?>
<?php
if ($template_name == 'blog_preview.php') {
include (TEMPLATEPATH . '/blog_preview.php');
}
if ($template_name == 'contact.php') {
include (TEMPLATEPATH . '/contact-slim.php');
}
?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'Appify' ), 'after' => '</div>' ) ); ?>
<div class="clear"></div>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php endwhile; ?>
<?php endif; ?>
<?php wp_reset_query(); ?>
<?php } else { ?>
<div class="section" id="getstarted">
<h2>Getting Started with AppifyWP</h2>
<p>This section will show until you've created and assigned a <a href="<?php bloginfo('wpurl'); ?>/wp-admin/nav-menus.php">custom menu</a> and will help guide you in setting up your AppifyWP powered site.</p>
<h3>Step1) Configure the AppifyWP Settings</h3>
<ul>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-admin/themes.php?page=appify_controlpanel.php">Configure AppifyWP Settings</a>. Here you'll be able to do things like:
<ul>
<li>Add your app's icon</li>
<li>Choose the platforms that your app supports and add screenshots, description, and download urls for each.</li>
<li>Add links to your Twitter and Facebook accounts</li>
<li>Customize the background color and texture of your site</li>
</ul>
</li>
</ul>
<br/>
<h3>Step2) Build out the sections of your homepage</h3>
<p>Each section of content on your homepage is treated as a “page” in wordpress. This getting started guide is a section of content. "Posts" is another section.</p>
<p> For example, if you want one section to show your app's version history, and another section to show customer testimonials, you create 2 pages, one for “Version History”, and one for “Testimonials”.</p>
<p> Once you've created pages of your sections, you use "<a href="<?php bloginfo('wpurl'); ?>/wp-admin/nav-menus.php">Menus</a>" to tell AppifyWP what sections to show on your homepage and in which order.</p>
<ul>
<li>
<a href="<?php bloginfo('wpurl'); ?>/wp-admin/post-new.php?post_type=page">Get started creating pages</a> in the "Pages" section of the admin. </li>
</ul>
<br/>
<h3>Step3) Create a custom menu</h3>
<p>This is where the magic of AppifyWP happens. With a custom menu, you tell Wordpress which pages you want to display as sections of content on your homepage and in which order to display them. AppifyWP will build a fancy menu and display your page content based on this.</p>
<ul>
<li><a href="<?php bloginfo('wpurl'); ?>/wp-admin/nav-menus.php">Create a custom menu</a></li>
<li>Assign that menu as your primary menu.</li>
</ul>
<br/>
<h3>Goodies</h3>
<ul> <li>AppifyWP comes pre-loaded with two custom page templates. Use the "Template" dropdown menu when creating a page to take advantage of the following:
<ul>
<li>The "<b>Contact Form</b>" template will populate the section with a beautiful and bulletproof contact form for your visitors to send you a message. Emails will be sent to the email address you provided when setting up wordpress. Forget about a captcha, you won't get spam emails with this.</li>
<li>The "<b>Blog Preview</b>" template will populate the section with the 5 most recent blog posts, like you see below.</li>
<li>The "<b>No Sidebar</b>" page template hide the sidebar on permalinked pages and display a full-width content area</li>
</li></ul></li></ul>
<br/>
<h3>Thats it!</h3>
<p>If you have any questions at all, contact me personally using the <a href="http://appifywp.com#support">support form</a>.</p>
</div>
<div class="section" id="posts">
<h2>Posts</h2>
<?php include (TEMPLATEPATH . '/blog_preview.php'); ?>
</div>
<?php } ?>
</div><!-- end wide-column -->
<div class="narrow-column">
<?php get_sidebar(); ?>
</div>
<div class="clear"></div>
<?php get_footer(); ?>