CMS Styles

Making the Web Look Pretty

Index.php

<?php get_header(); ?>

<div class="wrapper section-inner">

	<div class="content left">

		<?php if (have_posts()) : ?>

			<div class="posts">

				<?php
				$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
				$total_post_count = wp_count_posts();
				$published_post_count = $total_post_count->publish;
				$total_pages = ceil( $published_post_count / $posts_per_page );

				if ( "1" < $paged ) : ?>

					<div class="page-title">

						<h4><?php printf( __('Page %s of %s', 'hemingway'), $paged, $wp_query->max_num_pages ); ?></h4>

					</div>

					<div class="clear"></div>

				<?php endif; ?>

		    	<?php while (have_posts()) : the_post(); ?>

					<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

			    		<?php get_template_part( 'content', get_post_format() ); ?>

		    		</div> <!-- /post -->

		        <?php endwhile; ?>

			<?php endif; ?>

		</div> <!-- /posts -->

		<?php if ( $wp_query->max_num_pages > 1 ) : ?>

			<div class="post-nav archive-nav">

				<?php echo get_next_posts_link( __('&laquo; Older<span> posts</span>', 'hemingway')); ?>

				<?php echo get_previous_posts_link( __('Newer<span> posts</span> &raquo;', 'hemingway')); ?>

				<div class="clear"></div>

			</div> <!-- /post-nav archive-nav -->

		<?php endif; ?>

	</div> <!-- /content.left -->

	<?php get_sidebar(); ?>

	<div class="clear"></div>

</div> <!-- /wrapper -->

<?php get_footer(); ?>

Okay - now for a new theme...

I always start on these WordPress Conversions but never finish. This time I am determined.

I chose Hemingway.

Hemingway is a clean, beautiful and responsive two-column theme for bloggers.

based on this recommendation

His popular Hemingway theme has received more than 60,000 downloads on WordPress.org and is also offered on WordPress.com.

So let’s get started…

Jarvis

Edwin Jarvis is a supporting character in the Marvel Comics titles, The Avengers, Iron Man, and Spider-Man. He is the loyal household butler of Tony Stark, the billionaire playboy inventor who dons a suit of high-tech armor as the superhero Iron Man.

Since the 1990s, the character has appeared heavily in media adaptations of Iron Man and Avengers stories, and is commonly reimagined as “Just a Rather Very Intelligent System” (J.A.R.V.I.S.), not a butler but an artificial intelligence which assists the superhero Iron Man. In Marvel Cinematic Universe live action movies, J.A.R.V.I.S. is voiced by Paul Bettany.

Test Again

Test Again

Getting Messy URLS to work

When they didn’t work by default, I thought I could just uncomment the line in .htaccess but it didn’t work.

I ended up having to use this guide How To Use the .htaccess File and adding this entire section of code to the default.conf:

<Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
 </Directory>

Probably not the best way but it worked for now.

Test

test

Setting up a new version of the site

I was looking through the Textpattern Forum earlier and ran across a post I only vaguely remember writing.

  • Go to Admin | Diagnostics and check the error messages
    • Delete the setup folder
  • Go to Admin | Preferences and…
    • Set the timezone
    • Set the production status
    • Set the Permanent Link Mode
    • Set Automatically append comments to articles? to No
    • Set Present comments as a numbered list? to No
  • Go to Presentation | Pages and…
    • either create an About page or create a generic page for articles consisting of a single article
    • create a page for single articles
    • create a Search page
    • rename the archive page to Archives
  • Go to Presentation | Sections and…
    • Set the About Section to the About Page
    • Set the Articles Section to the Articles Page
    • Create a Search Section and set the Search Page
    • Create an Archives section and set the Archives Page
  • Go to Admin | Plugins and…
    • Install gbp_permanent_links
    • Install rvm_css
    • Install smd_if
  • Go to Admin | Permanent Links and, if Permanent Link Mode and create permalink structures for the individual sections as needed
  • Go to Presentation | Forms and delete unneeded forms
  • Create three new miscellaneous forms: header, sidebar, and footer
  • I like to work on a live install. This is the most of the default template from the latest site I have been working on. Most of mine are pretty similar to this.
<txp:output_form form="header" />

	<div id="primary">
		<div id="content" role="main">

<txp:variable name="task" value="frontpage" />

<txp:if_category>

	<txp:variable name="task" value="category" />

</txp:if_category>

<txp:if_search>

	<txp:variable name="task" value="search" />

</txp:if_search>

<txp:if_author>

	<txp:variable name="task" value="author" />

</txp:if_author>

<txp:output_form form='task-<txp:variable name="task" />' />

		</div><!-- #content -->
	</div><!-- #primary -->

<txp:output_form form="sidebar" />

<txp:output_form form="footer" />

I am going to use this is as the basis for setting things up.

© 2014 CMS Styles

Theme by Anders NorenUp ↑