How to add pagination for wordpress home page

I needed something similar on my blog too. I used the following code to add the necessary links (adjust as required) <?php previous_posts_link(__( ‘<button class=”btn btn-primary pull-left”><i class=”fa fa-long-arrow-left”></i>&nbsp; Newer Posts</button>’ )) ?> <?php next_posts_link(__( ‘<button class=”btn btn-primary pull-right”>Older Posts &nbsp;<i class=”fa fa-long-arrow-right”></i></button>’ )) ?>

image dimension in php code args

I used this code, but nothing happen, maybe there is something small detail missing thankyou who ever may help $mimes = array( ‘image/jpeg’); if( !in_array( $file[‘type’], $mimes ) ) return $file; $image = getimagesize($file[‘tmp_name’]); $minimum = array( ‘width’ => ‘400’, ‘height’ => ‘400’ ); $maximum = array( ‘width’ => ‘400’, ‘height’ => ‘400’ ); $image_width … Read more

show only one category posts in admin

to show one specific category posts in admin all posts page (edit.php?post_type=post) you need to join term_relationships table by filtering posts_join and adding where clause by filtering posts_where. eg. add_filter( ‘posts_join’, ‘hide_attachments_wpquery_join’ ); function hide_attachments_wpquery_join( $join, \WP_Query $query ) { global $wpdb; if( is_admin() && $query->query[‘post_type’] == “post” ) { $join .= ” LEFT JOIN … Read more

Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode

The following code is partialy taken from the plugin Taxonomy Images and it’s working: function get_taxonomy_image( $atts ) { $atts = shortcode_atts( array( ‘image_size’ => ‘thumbnail’, ‘id’ => ”, ), $atts ); if( ! empty( $atts[‘id’] ) ) { $term = get_term( $atts[‘id’] ); $related_id = 0; if ( isset( $term->term_taxonomy_id ) ) { $related_id … Read more

Can’t override CSS with child theme

They are using a more specific identifier in the theme on the homepage. try this one: .be-section .be-row:not(:last-child) .column-block h5:last-child { margin-bottom: 10px !important; } you can change the margin to whatever you want, of course. okay try this: #main .be-section .be-row:not(:last-child) .column-block h5:last-child { margin-bottom: 5px !important; }

Output fields manually in Woocommerce email templates

Probably the easiest way is to manually construct a new Billing address format by creating a copy of the WooCommerce email address template in /your-theme-driectory/woocommerce/emails/email-addresses.php by replacing the original echo $order->get_formatted_billing_address(); with for example: $output=”<strong>Customer Name: </strong>”.get_post_meta($order->id, ‘_billing_first_name’, true).'<br>’; $output .= ‘<strong>Customer Last Name: </strong>’.get_post_meta($order->id, ‘_billing_last_name’, true).'<br>’; $output .= ‘<strong>Company Name: </strong>’.get_post_meta($order->id, ‘_billing_company’, true).'<br>’; $output … Read more

Menu not Showing on Mobile or While the page is shrinked

I can’t see the style.css file of this theme. But through browser I indicate, media rules (at line#4884 of style.css) for .menu-top-menu-container cause this behavior. Removing .menu-top-menu-container’s property from this media rules could fix your problem.

Creating MP3 playlist

Yes, this is possible using the correct plugin. Audio Album is just one such plugin. Try searching the plugin repository using a variety of different queries, and you’ll probably find what you are looking for. Here’s a search on “mp3 album“. As for customising the appearance of the player interface, this depends, in part, on … Read more