Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Few questions about best practice

Home / Forums / Virtue Theme / Few questions about best practice

This topic is: Resolved
[Resolved]
Posted in: Virtue Theme
November 28, 2017 at 7:28 am

Hi Ben,

How would you do it, if you wanted to show something from a sidebar above content on mobile devices? I have one important block displayed with a shortcode in a sidebar. But on mobile devices it appears after the content. Would it be correct to place it both in content and sidebar and wrap in divs, which are visible/invisible on different width, e.g below:

<div id="incontent" style="@media(max-width:767px){display:none}">
[shortcode for php function]
</div>

<div id="insidebar" style="@media(min-width:768px){display:none}">
[shortcode for php function]
</div>

Can it cause any problems?
——————————–

Q2: There is an author posts loop in lib/authorbox.php, can I show both portfolios and posts in that loop mixed?

<?php
global $authordata, $post;
$temp = null;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query(array(
'author' => $authordata->ID,
'posts_per_page'=>3));
$count =0;
if ( $wp_query ) :
while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

Thanks!

  • The forum ‘Virtue Theme’ is closed to new topics and replies.