-
AuthorPosts
-
June 14, 2014 at 8:54 pm #56402
Ok scrap that. I worked out how to do what you asked, but it put another sharing box ABOVE the image. I want it just below the image, aligned to the right. I tried to solve this myself but failed.
Ideally, I’d like to have sharing buttons:
– On the main nav bar (so people can always click ‘share’, regardless of where they are on the front page,
– At the bottom of Blog Posts,
– On Portfolio items, once directly underneath the photo, aligned to the right, and at the bottom of the article.Bit of a problem with this, “Click on a photo to see how it was made!”: I’ve edited the _portfolio_php as shown below, but it’s not responding to changes in the customiser’s css box.
_portfolio.php:
<?php
// =============================================================================
// VIEWS/GLOBAL/_PORTFOLIO.PHP
// —————————————————————————–
// Includes the portfolio output.
// =============================================================================$stack = x_get_stack();
$entry_id = get_the_ID();
$paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1;
$cols = get_post_meta( $entry_id, ‘_x_portfolio_columns’, true );
$count = get_post_meta( $entry_id, ‘_x_portfolio_posts_per_page’, true );
$filters = get_post_meta( $entry_id, ‘_x_portfolio_category_filters’, true );switch ( $cols ) {
case ‘One’ : $cols = 1; break;
case ‘Two’ : $cols = 2; break;
case ‘Three’ : $cols = 3; break;
case ‘Four’ : $cols = 4; break;
}?>
<?php x_get_view( ‘global’, ‘_script’, ‘isotope-portfolio’ ); ?>
<p style=”click_caption”>
Click on a photo to see how it was made!
</p><div id=”x-iso-container” class=”x-iso-container x-iso-container-portfolio cols-<?php echo $cols; ?>”>
<?php
if ( count( $filters ) == 1 && in_array( ‘All Categories’, $filters ) ) {
$args = array(
‘post_type’ => ‘x-portfolio’,
‘posts_per_page’ => $count,
‘paged’ => $paged,
‘orderby’ => ‘rand’,
);} else {
$args = array(
‘post_type’ => ‘x-portfolio’,
‘posts_per_page’ => $count,
‘paged’ => $paged,
‘orderby’ => ‘rand’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘portfolio-category’,
‘field’ => ‘id’,
‘terms’ => $filters
)
)
);}
$wp_query = new WP_Query( $args );
?>
<?php if ( $wp_query->have_posts() ) : ?>
<?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
<?php if ( $stack != ‘ethos’ ) : ?>
<?php x_get_view( $stack, ‘content’, ‘portfolio’ ); ?>
<?php else : ?>
<?php x_ethos_entry_cover( ‘main-content’ ); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?></div>
<?php pagenavi(); ?>
<?php wp_reset_query(); ?><div id=”x-iso-container” class=”x-iso-container x-iso-container-portfolio cols-<?php echo $cols; ?>”>
What I’ve added to the Customiser’s CSS box:
.click_caption {
text-align: center;
font-size: 25px;
color: #ffffff;
}June 14, 2014 at 9:03 pm #56404Aaand a small gripe: On large screens, the headings at the top of portfolio items are centered, but when the browser window becomes narrow-enough, the heading shifts to being aligned to the left.
Would be nice we could make it stay centered?
http://www.howimadethisphoto.com/portfolio-item/machapuchre/
June 16, 2014 at 2:01 am #56722Hi Andrew,
To center that title on both mobile and desktop, you will to add this css.
.entry-title { text-align: center; }
About your other issues, I can’t confirm what causing those until I check it. If you’d like, I can investigate a bit. Would you mind providing us with login credentials so I can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply to ensure that your data remains hidden
-
AuthorPosts