How can I support plugins in a custom theme?

Underscores.me Framework has integrated support for Jetpack’s Infinite Scroll feature – you could just install the Automattic JetPack plugin and ensure that the Infinite Scroll feature is enabled. Lines 155-156 of the default underscores.me framework add Jetpack support if it’s installed: /** * Load Jetpack compatibility file. */ if ( defined( ‘JETPACK__VERSION’ ) ) { … Read more

Woocommerce product rewrite rules not working

No need to add additional rewrite rule for that, WooCommerce already provide a way to mess with product permalink. Visit Wp Admin > General > Permalink page, and use /product/%author%/ as Product permalinks value. This will organize the product url as you need. However, WooCommerce won’t replace %author% tag with product’s author as like we … Read more

Only display archive subtitle on the first archive page

is_paged() can be used to tell if you are on any page other than the first page of an archive. You could use it like this: <?php if ( $archive_subtitle && ! is_paged() ) { ?> <div class=”archive-subtitle section-inner thin max-percentage intro-text”><?php echo wp_kses_post( wpautop( $archive_subtitle ) ); ?></div> <?php } ?>

How to exclude subscriber from the list in wordpress

working code ..thx @michael <?php $number = 10; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; $offset = ($paged – 1) * $number; $users = get_users(); $query = get_users(‘&offset=”.$offset.”&number=”.$number.”&role__not_in=’.subscriber); $total_users = count($users); $total_query = count($query); $total_pages = intval($total_users / $number) + 1; echo ‘<ul id=”list-mitra”>’; foreach($query as $q) { ?> <li class=”bullet-arrow”> <a href=”#mitra<?php echo get_the_author_meta( … Read more

Send email to multiple addresses on Contact Form 7, but exclude personal details on all but one

Contact Form 7 lets you set up multiple outgoing emails. Set the outgoing message for the ‘everyone-except-one’, and a 2nd outgoing message for ‘just-the-one’. And use the BCC feature to keep everyone’s email confidential. Info on how to do that is on the CF7 site and support forums…..which is where you should ask for support … Read more

Hiding a row in the loop if empty

Just wrap the opening and closing div like this: <?php if ( ! in_array( ‘daily-email’, $post_terms, false ) ) : ?> <div class=”row episodes-feed-wrap”> ……. all your content and markup …….. </div><!– /this is your closing row div tag –> <?php endif ?> OR if you don’t want that category to output at all, change … Read more