How to overwrite ‘read more” text for artmag theme

To change the text of the “Read More” link, you simply need to hook into the_content_more_link at a higher priority. You can add this to your child theme functions.php file and it should replace the “Read More” text with “Your Preferred Link Text”. add_filter( ‘the_content_more_link’, ‘wpse_260911_more_link’, 11, 2 ); function wpse_260911_more_link( $more_link, $not_used ) { … Read more

How can i hide the authors box from a specific set of categories and post types?

This depends on your theme. If it has no option for this, you’ll have to do this yourself. Find the template where the author box is generated (presumably single.php) and copy it to a child theme. Then make the production of the box conditional to the current category; if (!is_category (array (‘exclude-this-category, another-category-to-exclude’)) { echo … Read more

Button to execute shorcode [closed]

That could be have a sense if the shortcode is only for content and if that can help you to limit the charge of queries. Then use wp_ajax and do_shortcode in. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_(action) https://developer.wordpress.org/reference/functions/do_shortcode/ But keep careful because a lot of shortcodes define css in wp_head & js in wp_footer, so with this solution it will … Read more

Wrap every 2 posts

You need to start Row class after every 2N+1 post. And end the Row class after every 2N+2 Post. Try this one <?php $counter++; if ($counter % 2 == 1) : ?> <?php echo ‘<div class=”post-wrapper”>’; ?> <?php endif; ?> <?php get_template_part( ‘templates/blog/blog-2-cols’, get_post_format() );?> <?php $counter++; if ($counter % 2 == 0) : ?> … Read more

Display popularpost posts of the last 2 days

in argument list please also pass date_query, try below example. $args = array( ‘posts_per_page’ => 10, ‘post_type’ => ‘post’, ‘order’ => ‘DESC’, ‘date_query’ => array( ‘after’ => ‘2 days ago’, ‘inclusive’ => true ) ); $posts = get_posts($args);