Example #1
0
/**
 * Removes image and gallery post formats from is_home if option is set
 */
function portfoliopress_exclude_post_formats($query)
{
    if (!portfoliopress_get_option('display_image_gallery_post_formats', true) && $query->is_main_query() && $query->is_home()) {
        $tax_query = array(array('taxonomy' => 'post_format', 'field' => 'slug', 'terms' => array('post-format-image', 'post-format-gallery'), 'operator' => 'NOT IN'));
        $query->set('tax_query', $tax_query);
    }
}
Example #2
0
<?php

/**
 * Sidebar template
 *
 * @package Portfolio Press
 */
if ('layout-1col' != portfoliopress_get_option('layout')) {
    ?>
	<div id="sidebar" role="complementary">
		<ul class="xoxo">
		<?php 
    if (!dynamic_sidebar('sidebar')) {
        ?>

			<li id="search" class="widget-container widget_search">
				<?php 
        get_search_form();
        ?>
			</li>

			<li id="archives" class="widget-container">
				<h3 class="widget-title"><?php 
        _e('Archives', 'portfolio-press');
        ?>
</h3>
				<ul>
					<?php 
        wp_get_archives(array('type' => 'monthly'));
        ?>
				</ul>
Example #3
0
			<?php 
    }
    ?>

			<?php 
    portfoliopress_paging_nav($portfolio);
    ?>

		<?php 
} else {
    ?>
			<?php 
    get_template_part('content', 'none');
    ?>
		<?php 
}
?>

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

<?php 
wp_reset_query();
?>

<?php 
if (!portfoliopress_get_option('portfolio_sidebar', false)) {
    get_sidebar();
}
get_footer();
Example #4
0
						<?php 
    $metadata = wp_get_attachment_metadata();
    printf(__('<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'portfolio-press'), esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_url(wp_get_attachment_url()), $metadata['width'], $metadata['height'], esc_url(get_permalink($post->post_parent)), esc_attr(strip_tags(get_the_title($post->post_parent))), get_the_title($post->post_parent));
    ?>
						<?php 
    edit_post_link(__('Edit', 'portfolio-press'), '<span class="edit-link">', '</span>');
    ?>
					</footer>

				</article><!-- #post-<?php 
    the_ID();
    ?>
 -->

				<?php 
    if (portfoliopress_get_option('portfolio_navigation', true)) {
        portfoliopress_post_nav();
    }
    ?>

				<?php 
    if (comments_open()) {
        comments_template('', true);
    }
    ?>

			<?php 
}
// end of the loop.
?>
Example #5
0
		<?php 
if ('page' != $post->post_type) {
    ?>
		<div class="entry-meta">
			<?php 
    portfoliopress_postby_meta();
    ?>
		</div><!-- .entry-meta -->
		<?php 
}
?>
	</header><!-- .entry-header -->

	<div class="entry-content">
		<?php 
if (portfoliopress_get_option('portfolio_images', true)) {
    portfoliopress_display_image();
}
?>
		<?php 
the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'portfolio-press'));
?>
		<?php 
wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'portfolio-press'), 'after' => '</div>'));
?>
	</div><!-- .entry-content -->

	<?php 
portfoliopress_footer_meta($post);
?>
/**
 * Helper function for displaying image
 */
function portfoliopress_display_image()
{
    // Don't display images on single post if the option is turned off
    if (is_single() && !portfoliopress_get_option('portfolio_images', true)) {
        return;
    }
    if (!post_password_required() && has_post_thumbnail()) {
        if ('image' == get_post_format() || 'portfolio' == get_post_type()) {
            ?>
	<div class="portfolio-image">
		<?php 
            if (!is_single()) {
                ?>
			<a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" class="thumb">
		<?php 
            }
            ?>
		<?php 
            if (portfoliopress_get_option('layout') == 'layout-1col') {
                the_post_thumbnail('portfolio-fullwidth');
            } else {
                the_post_thumbnail('portfolio-large');
            }
            ?>
		<?php 
            if (!is_single()) {
                ?>
			</a>
		<?php 
            }
            ?>
	</div>
	<?php 
        }
    }
}
Example #7
0
        ?>
			<?php 
    }
    ?>

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

		</div><!-- /#footer-widgets  -->

    <?php 
}
?>

		<div id="site-generator">
			<p><?php 
if (!($footer = portfoliopress_get_option('footer_text', false))) {
    ?>
				<?php 
    _e('Powered by', 'portfolio-press');
    ?>
 <a href="http://wordpress.org/" title="<?php 
    esc_attr_e('A Semantic Personal Publishing Platform', 'portfolio-press');
    ?>
" rel="generator"><?php 
    printf(__('WordPress', 'portfolio-press'));
    ?>
</a> &amp; <a href="http://wptheming.com/2010/07/portfolio-theme/"><?php 
    _e('Portfolio', 'portfolio-press');
    ?>
</a>.
			<?php 
Example #8
0
" alt="<?php 
    echo bloginfo('name');
    ?>
">
				<?php 
} else {
    bloginfo('name');
}
?>
                </a>
                </<?php 
echo $heading_tag;
?>
>
				<?php 
if (!portfoliopress_get_option('logo', false)) {
    ?>
                	<h2 id="site-description"><?php 
    bloginfo('description');
    ?>
</h2>
                <?php 
}
?>
			</hgroup>

			<nav id="navigation" class="site-navigation primary-navigation" role="navigation">
				<h1 class="menu-toggle"><?php 
_e('Menu', 'portfolio-press');
?>
</h1>
    /**
     * Display navigation to next/previous post when applicable.
     *
     * @return void
     */
    function portfoliopress_post_nav()
    {
        if (!portfoliopress_get_option('postnav', false)) {
            return;
        }
        // Don't print empty markup if there's nowhere to navigate.
        $previous = is_attachment() ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
        $next = get_adjacent_post(false, '', false);
        if (!$next && !$previous) {
            return;
        }
        ?>
	<nav id="nav-below" class="navigation post-navigation clearfix" role="navigation">
		<h1 class="screen-reader-text"><?php 
        _e('Post navigation', 'portfolio-press');
        ?>
</h1>
		<div class="nav-links">
			<?php 
        if ('portfolio' == get_post_type()) {
            // Links reversed for portfolio posts
            previous_post_link('<div class="nav-next">%link</div>', _x('%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'portfolio-press'));
            next_post_link('<div class="nav-previous">%link</div>', _x('<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'portfolio-press'));
        } elseif (is_attachment()) {
            ?>
				<div class="nav-previous"><?php 
            previous_image_link(false, __('&larr; Previous', 'portfolio-press'));
            ?>
</div>
				<div class="nav-next"><?php 
            next_image_link(false, __('Next &rarr;', 'portfolio-press'));
            ?>
</div><?php 
        } else {
            previous_post_link('<div class="nav-previous">%link</div>', _x('<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'portfolio-press'));
            next_post_link('<div class="nav-next">%link</div>', _x('%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'portfolio-press'));
        }
        ?>
		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
    }
Example #10
0
<?php

/**
 * The template for displaying archive pages
 *
 * @package Portfolio Press
 */
get_header();
?>

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

		<?php 
if (is_tax() || is_category() || is_tag()) {
    if (portfoliopress_get_option('archive_titles', true)) {
        ?>
				<header class="archive-header">
					<h1 class="archive-title"><?php 
        echo single_term_title('', false);
        ?>
</h1>
					<?php 
        $description = term_description();
        if (!empty($description)) {
            echo apply_filters('archive_meta', '<div class="archive-meta">' . $description . '</div>');
        }
        ?>
				</header>
			<?php 
    }