I want to learn how the classicmag-theme work, when downloading the theme – i can see a three-column-layout but when starting out , I am here with only one column.
Is the feature of using a three-column layout not active when starting, there seems to be a hint using the ‘widgets’ .
How do i get to like the rollingstonemagazine ? ( https://xwp.co/case-study/rolling-stone-new-website-build/ ) – can I walk through a tutorial somewhere ? Is everything there or do I need to make a child-theme ?
best, i
]]>Id like the footer widget areas in the footer to collapse – stack on top each other as the screen size becomes smaller.
On large screens I like all widgets side by side (3 columns like) but on smaller device I want them to be stacked full width.
Code Im using:
in functions.php
function LD19twentytwelvechild_widgets_extra() {
register_sidebar( array(
'name' => __( 'Social Icons Header', 'twentytwelve' ),
'id' => 'social-icons-top',
'description' => __( 'Found at the top of every page (except 404s and optional homepage template) Center Footer Widget.', 'mytheme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => __( 'Footer 1', 'twentytwelve' ),
'id' => 'footer-1',
'description' => __( 'Found at the top of every page (except 404s and optional homepage template) Center Footer Widget.', 'mytheme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="mywidget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => __( 'Footer 2', 'twentytwelve' ),
'id' => 'footer-2',
'description' => __( 'Found at the top of every page (except 404s and optional homepage template) Center Footer Widget.', 'mytheme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="mywidget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => __( 'Footer 3', 'twentytwelve' ),
'id' => 'footer-3',
'description' => __( 'Found at the top of every page (except 404s and optional homepage template) Center Footer Widget.', 'mytheme' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="mywidget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'LD19twentytwelvechild_widgets_extra', 11);
and my footer.php
<div id="mywidgets">
<div id="footer-1">
<?php
if(is_active_sidebar('footer-1')){
dynamic_sidebar('footer-1');
}
?>
</div>
<div id="footer-2">
<?php
if(is_active_sidebar('footer-2')){
dynamic_sidebar('footer-2');
}
?>
</div>
<div id="footer-3">
<?php
if(is_active_sidebar('footer-3')){
dynamic_sidebar('footer-3');
}
?>
</div>
</div>
and in my child theme css
#footer-1 {
float: left;
width: 33.3%;
padding-right: .1%;
}
#footer-2 {
float: left;
width: 33.2%;
padding-right: .1%;
}
#footer-3 {
float: right;
width: 33.3%;
}
#mywidgets {
width: 100%;
padding-top: 17px;
color: #444;
line-height: 2;
}
Thanks!
]]>I would like to have the full posts showing in the home page (no excerpts), full width, is it possible?
]]>I have been using the excellent three column post function developed by Michael (@alchymyth) on several sites.
Here it is formatting properly on a home page of a test site; it also formats properly on search, any taxonomy, etc. (when using those conditional arguments). But it doesn’t format properly when used for a single post with a related query (see here). I’ve also noticed that the formatting doesn’t work properly on a page template with post queries. I think I’ve tried every possible conditional argument, but notice how on the latter example none of the related posts below the single post are assigned the ‘column-post-left’ class. I’m doing something incorrectly, but what?
Here are the functions and arguments I’m using below :
functions.php
add_filter('post_class','category_three_column_classes');
function category_three_column_classes( $classes ) {
global $wp_query;
if( is_post_type_archive('products') || is_tax () || is_home() || is_singular('products') || is_search() || is_page(1689)
) :
$classes[] = 'three-column-post';
if( $wp_query->current_post%3 == 0 ) $classes[] = 'column-post-left';
endif;
return $classes;
}
single-products.php
<div id="primary" class="site-content">
<div id="content" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content-products', get_post_type() ); ?>
<?php comments_template( '', true ); ?>
<?php endwhile; // end of the loop. ?>
</div><!-- #content -->
</div><!-- #primary -->
<div id="primary" class="site-content">
<div id="content" role="main">
<?php $this_post = $post->ID;
$args = array(
'post_type' => 'products',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'post__not_in' => array($this_post),
);
$terms = get_the_terms($this_post,'region');
if (!is_wp_error($terms)) {
$terms = wp_list_pluck($terms,'term_id');
$args['tax_query'] = array(
array(
'taxonomy' => 'region',
'field' => 'id',
'terms' => array_values($terms)
)
);
$my_query = null;
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
echo '<h1 class="entry-title"> "Related Regional Products" </h1>' . '<br>' . '<br>' ;
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php get_template_part( 'content-archive-long' ); ?>
<?php
endwhile;
}
wp_reset_query();
?>
<?php } ?>
</div><!-- #content -->
</div><!-- #primary --> '
CSS
three-column-post { width: 31.0%; float: left; margin-left: 3.0%; }
.column-post-left { clear: left; margin-left: 0; }`
It worked until I had 6 images, then the grid page went crazy and in some lines it appears only 1 image.
You can see my blog page here https://supermamiblog.com/b/per-ingrediente/
I also removed the part that Siobhan Bamber suggested me, from my custom CSS, but nothing changed.
Any suggestions?
I will have a lot of lines, so it is important that the page will look good!
Thanks!
It worked until I had 6 images, then the grid page went crazy and in some lines it appears only 1 image.
You can see my blog page here https://supermamiblog.com/b/per-ingrediente/
I also removed the part that Siobhan Bamber suggested me, from my custom CSS, but nothing changed.
Any suggestions?
I will have a lot of lines, so it is important that the page will look good!
Thanks!
When any of the pages load that are either category pages or have plenty of content, the sidebars line up nicely.
Unfortunately, when loading pages that have just a like into like the contact page the left sidebar gets bumped off, showing up towards the bottom of the right sidebar; but not even lining up there.
I need to create a set site-content space that will ensure that the sidebars show up properly.
How do I do this?
]]>