EDITS.WS

Tag: WordPress Plugin

  • Notion WP Sync Pro: Connecting WordPress and Notion

    By connecting Notion to WordPress, you can seamlessly transfer your content from Notion to WordPress for publishing without the need for manual copying and pasting. Notion WP Sync Pro+ integration makes connecting easy.

    The post “Notion WP Sync Pro: Connecting WordPress and Notion” first appeared on WP Mayor.

  • How to Display Most Commented Posts in WordPress (2 Ways)

    Do you want to display your most commented posts in WordPress?

    Highlighting your most commented posts helps your visitors find your best content, increase pageviews, and boost website engagement.

    In this article, we’ll show you how to display the most commented posts in WordPress, step by step.

    How to display most commented posts in your WordPress

    Why Display the Most Commented Posts in WordPress?

    Your most commented posts have very high levels of user engagement. By displaying your popular posts, you encourage new readers to join the discussion and spend more time on your WordPress website.

    All of this together is a big boost of social proof for your site.

    When your visitors stay on your site longer, you can convince them to read another post, join your email list, or make a purchase.

    Plus, when new visitors leave a comment, they become part of the community. This can help you build trust with your readers over the long term.

    That being said, let’s take a look at how to simply display your most commented posts in WordPress using 2 methods. You can click the links below to move to any section:

    Method 1: Display Most Commented Posts With a Plugin in WordPress (Recommended)

    There are many different WordPress popular posts plugins that you can use to display your popular articles, but the simplest to use is MonsterInsights.

    It’s the best analytics solution for WordPress, used by over 3 million websites. With this plugin, you can easily display your most commented posts anywhere on your website.

    The first thing you need to do is install, activate, and set up MonsterInsights. For more details, see our beginner’s guide on how to install Google Analytics in WordPress.

    Note: there is a free version of MonsterInsights, but we’re using the pro version for this tutorial since it includes the popular posts feature.

    Upon activation, navigate to Insights » Popular Posts and then click the ‘Popular Posts Widget’ tab in the menu.

    Popular post widget

    On this screen, you will control the appearance of your most commented posts.

    Simply select the ‘Theme’ you want to use for your most commented posts. The theme operates similarly to your WordPress theme and will control the overall design of the most commented posts widget.

    There are a ton of other customization options on this screen as well.

    For example, in the ‘Theme Preview’ meta box, you can display your most commented posts in a ‘Wide’ format below your content or a ‘Narrow’ format to the right of your content.

    View theme preview

    After that, you have more options for customizing the design.

    For example, you can change the size and color of the title, icon, and background.

    Customize widget design

    MonsterInsights will automatically save any changes you make to your most commented posts display settings.

    Once you’re finished customizing the appearance of your commented posts, it’s time to display your popular posts by comments.

    In the ‘Sort By’ meta box, simply select the ‘Comments’ button.

    Sort by comments

    Next, you can scroll down and view more options to include and exclude posts.

    There is also an option to include posts from specific categories in the popular post widget.

    Include and exclude posts

    MonsterInsights will automatically display your most commented posts.

    You have a few different options for adding your popular posts to WordPress. You can choose manual or automatic placement.

    If you choose ‘Automatic’ placement, then the plugin will add your most commented WordPress posts directly after the last paragraph of your blog posts.

    Enable automatic placement

    The other option is to display your most commented posts manually. If you select the ‘Manual’ option, then you can add the popular posts widget with a Gutenberg block or a shortcode.

    To do this, open up a page or post where you want to display your most commented posts.

    Once inside the content editor, just click the ‘+’ icon and select the ‘Popular Posts’ block.

    Add popular post block

    This will automatically add your most commented posts to your page.

    Make sure you click ‘Update’ or ‘Publish’ to make your changes live.

    Update and publish your changes

    Now when your users visit the page, they will see your most commented posts displayed.

    You can visit the website to see the most popular posts with comments in action.

    View most popular posts preview

    Method 2: Display Most Commented Posts Using Code

    The second method involves adding code to your WordPress files.

    However, there are some downsides to using this method. First, it involves adding code to WordPress, so it’s not beginner-friendly. It can cause serious problems with even a small error, so we recommend editing WordPress core files for advanced users.

    Second, the code isn’t as optimized for performance as the MonterInsights plugin. That means it will increase the server load, and it can slow down your website.

    That being said, let’s take a look at how you can display the most commented posts in WordPress without a plugin.

    Adding Code Snippet to functions.php File

    You’ll want to add the code provided below to your functions.php file. We recommend doing this by using the WPCode plugin. It’s the safest and best way to add custom code to your WordPress website.

    First, you will need to install and activate the WPCode plugin. For more details, please see our guide on how to install a WordPress plugin.

    Note: You can also use the free WPCode plugin as it has all the features you need to add this code.

    Once activated, you can head to Code Snippets » Add Snippet from your WordPress dashboard and select the ‘Add Your Custom Code (New Snippet)’ option.

    How to show post excerpts using code

    Next, you can add a name for your code snippet at the top of the page. Now, just copy and paste this code into the ‘Code Preview’ box:

    function wpb_most_commented_posts() { 
    // start output buffering
    ob_start();
    ?>
    <ul class="most-commented">
    <?php 
    // Run WP_Query
    // change posts_per_page value to limit the number of posts
    $query = new WP_Query('orderby=comment_count&posts_per_page=10'); 
      
    //begin loop
    while ($query->have_posts()) : $query->the_post(); ?>
      
    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> <span class="wpb-comment-count"><?php comments_popup_link('No Comments;', '1 Comment', '% Comments'); ?></span></li>
    <?php endwhile; 
    // end loop
    ?>
    </ul>
    <?php
      
    // Turn off output buffering
     $output = ob_get_clean(); 
      
    //Return output 
    return $output; 
    }
    // Create shortcode
    add_shortcode('wpb_most_commented', 'wpb_most_commented_posts'); 
      
    //Enable shortcode execution in text widgets
    add_filter('widget_text', 'do_shortcode');
    

    After that, make sure to click the Code Type dropdown menu and select the ‘PHP Snippet’ option.

    Copy and paste code snippet

    Once that’s done, simply click the toggle to make the code ‘Active’ and then press the ‘Save Snippet’ button at the top.

    For more details, please check out our beginner’s guide to pasting snippets from the web into WordPress.

    The code will run a database query and fetch 10 posts ordered by the highest comment count. Then, it uses output buffering to create a shortcode you can use to display the posts.

    The last line of the code creates a shortcode that you can use in your posts, pages, and widget areas.

    To display your popular posts, all you need to do is add the following shortcode to your WordPress site.

    [wpb_most_commented]

    For more details, see our beginner’s guide on how to add a shortcode in WordPress.

    If you want to add thumbnails next to your post titles, then add the following line of code right after <li> tag in the code above.

    <?php the_post_thumbnail(array(40,40)); ?>
    

    This code will define the custom size for the post thumbnail images. You can adjust the size to meet your needs.

    Style Your Most Commented Posts using CSS

    Once you’ve done that, you can style how your most commented posts will display.

    To do this, you can modify the .most-commented and .wpb-comment-count CSS classes in your WordPress theme’s stylesheet.

    You can use the following CSS to get started:

    .most-commented li { 
    border-bottom:1px solid #eee; 
    padding-bottom:3px; 
    } 
    .most-commented li :after { 
    clear:both;
    } 
    .most-commented img { 
    padding:3px;
    margin:3px;
    float:left;
    }
    .wpb_comment_count a, .wpb_comment_count a:active, .wpb_comment_count a:visited, .wpb_comment_count a:hover { 
    color:#FFF;
    }
    

    To add CSS to your website theme’s stylesheet, you can use WPCode. Simply go to Code Snippets » Add Snippet from your WordPress dashboard and select the ‘Add Your Custom Code (New Snippet)’ option.

    How to show post excerpts using code

    Next, enter the CSS code under the Code Preview area and add a title for your snippet.

    Just ensure that you click the Code Type dropdown menu and select the ‘CSS Snippet’ option.

    Add CSS code snippet

    When you’re done, don’t forget to switch the toggle to ‘Active’ and then click the ‘Save Snippet’ button at the top.

    For more details, see our guide on how to easily add custom CSS to your WordPress site.

    We hope this article helped you display the most commented posts in WordPress. You may also want to see our ultimate WordPress SEO guide to get more traffic, and our expert pick of the best WordPress plugins for businesses.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Display Most Commented Posts in WordPress (2 Ways) first appeared on WPBeginner.

  • WordPress Losing Ground: Can Coopetition Ensure Survival?

    Despite facing increased competition from user-friendly website builders and specialized CMSs, WordPress continues to be a strong contender in the content management system market. This article explores how WordPress can combat the decline by embracing a strategy of coopetition, where it collaborates with these competitors to offer enhanced features and user experiences. By leveraging the strengths of its rivals, WordPress can adapt to evolving consumer preferences and maintain its position as a leading choice for website creators and bloggers.

    The post “WordPress Losing Ground: Can Coopetition Ensure Survival?” first appeared on WP Mayor.

  • ClickWhale Review: Masterful Link Management Made Easy!

    ClickWhale is a WordPress plugin offering link management, shortening, and analytics. Create and customize link pages, manage SEO settings, and embed tracking codes without modifying your site’s code. All on your own domain.

    The post “ClickWhale Review: Masterful Link Management Made Easy!” first appeared on WP Mayor.

  • WP Full Picture Review: WordPress Cookie Compliance + Analytics

    WP Full Picture helps you install any tracking tool on your site, manage the ones you are using and get all of them to comply with privacy laws. You can add and enhance tracking scripts to collect data while also displaying a smart cookie consent notice that automatically integrates those scripts.

    Learn more in our full hands-on WP FullPicture review.

    The post “WP Full Picture Review: WordPress Cookie Compliance + Analytics” first appeared on WP Mayor.

  • How to Add Product Questions And Answers in WooCommerce

    Are you looking to add a product question and answer section in WooCommerce?

    Adding a Q&A section enables customers to ask questions about the product before buying it, and see the questions and answers of other customers. This helps recover abandoned cart sales and improve customer engagement in your store, and reduce support requests.

    In this article, we’ll show you how to easily add product questions and answers in WooCommerce.

    How to add product questions and answers in WooCommerce

    Why Should You Add Product Q&A in WooCommerce

    You may have noticed the product question-and-answer section on popular eCommerce websites like Amazon, Target, Best Buy, and more.

    Target Q&A example

    Adding a product questions and answers section allows customers to ask questions about a product right there on the product page.

    You or your customers can then answer that question and it becomes visible to all other new customers who may have the same question in mind.

    Over a period of time, your product page will have its own frequently asked questions section, which will help increase sales and reduce abandoned cart rates.

    Adding a question and answers section to your online store also allows you to curate user-generated content which improves your WooCommerce product search rankings.

    That being said, let’s see how you can easily add product questions and answers to WooCommerce.

    1. Adding a Product Q&A Section Using a Premium Plugin

    For this method, we will be using the YITH WooCommerce Questions and Answers plugin.

    It is a premium plugin and comes with more features to easily add an engaging Q&A section with a better user experience.

    First, you need to install and activate the YITH WooCommerce Questions and Answers plugin. For more instructions, please see our step-by-step guide on how to install a WordPress plugin.

    Upon activation, go to the YITH » License Activation page and enter your license key. You can find this information under your account on the plugin website.

    Activate your YITH plugin with the license key

    Don’t forget to click on the Activate button after entering your license key.

    Next, you need to go to the YITH » Questions and Answers page to configure plugin settings.

    YITH Quiestions and Answers settings

    From here you need to scroll down to the ‘Question Approval’ option and simply toggle the switch to ‘Yes’.

    Once you do that, the questions on the product pages will have to be approved by an administrator before they are displayed on your WooCommerce store.

    Toggle the switch next to the Question Approval field

    Next, you need to scroll to the ‘Show on Product Tabs’ option.

    Here, you need to toggle the switch to ‘Yes’ so that the plugin will automatically add a ‘Questions and Answers’ section to product pages.

    Toggle the switch next to the Product on tab field

    After that, don’t forget to click the ‘Save Options’ button to store your changes.

    Now, you need to switch to the ‘Advanced Settings’ tab.

    From here, simply toggle the ‘Vote Question’ switch to ‘Yes’ if you want to allow users to vote on product questions.

    Go to the advanced settings tab

    Next, you can choose if you want to get an email notification once a question is submitted on your website.

    Simply select the ‘Notification in HTML Email’ option from the dropdown menu next to the ‘New question notification’ field.

    Tip: To ensure email deliverability you need to use an SMTP server. See our guide on how to fix WooCommerce not sending emails issue.

    Similarly, you can also choose the ‘Notification in HTML Email’ option in the ‘New answer notification’ field if you want to receive an email once a question is answered on your site.

    Configure the New question notification field settings

    Your user can also receive a notification once the question submitted by them is answered.

    To enable this, you need to toggle the switch next to the ‘User Notification’ option to ‘Yes’.

    Toggle the user notification

    After that, you can review other settings. The default options would work for most websites but you can change them if needed.

    Finally, don’t forget to click on the ‘Save Options’ button to save your changes.

    You can now visit your website to see the Questions & Answers section appear on your product pages.

    Questions form below product pages

    From here, your customers can submit their questions.

    Moderating Questions and Adding Answers

    You will receive an email notification for new questions submitted by the users. You can also view them by visiting the Questions & Answers » All discussion page.

    Moderate question and answers

    You can sort entries here by ‘Content not approved’ or ‘Unanswered Questions’.

    You can also take your mouse over a question and click ‘Approve’ to make it live.

    To add an answer to a question, you can simply click on the ‘Edit’ link below that question. On the edit screen, scroll down to the ‘Your Answer’ section to answer the question.

    Add your answer

    Repeat the process if you have more unanswered questions.

    This is how the product questions and answers section looked on our demo store.

    Question and answers preview

    2. Adding a Product Q&A Section Using a Free Plugin

    If you want to use a free plugin to add a product Q&A section to your WooCommerce store, then this method is for you.

    First, you need to do is install and activate the Product Questions & Answers for WooCommerce plugin. For more instructions, see our guide on how to install a WordPress plugin.

    Upon activation, click the Product Q&A menu from the WordPress admin sidebar which will direct you to the ‘Product Q&A Settings’ page.

    From here, simply check the ‘Load More’ option if you want to add a ‘load More’ button to your product Q&A section.

    Adding this button will allow customers to load older questions and reduces the page load time if a product gets a ton of questions.

    Simply check the Load more box

    Next, you need to choose a page size.

    This means that you need to select a default number of questions that are shown in your Q&A section.

    All the other questions will be hidden from view. Users will be able to access those questions after clicking the ‘Load More’ button.

    You can also change the text used for the ‘Load More’ button to anything you like. For instance, you can call it ‘Load more questions’.

    Choose a paging button name

    Next, you need to choose a layout for your product Q&A section from the dropdown menu next to the ‘Layout’ option.

    You can choose the ‘Normal’ option if you want to display the Q&A section in paragraphs.

    Select layout and save your changes

    On the other hand, you can also display your questions as an Accordion menu. This means users will need to click on a question to view the answer.

    Once finished, don’t forget to click the Submit button at the bottom to save your settings.

    Managing Product Question and Answers

    After plugin configuration, simply visit any product page on your store. You’ll notice a new Q&A tab added there.

    Click Q and A tab on the product page

    Clicking on it will display the ‘Q&A’ section where customers can submit their questions.

    You will receive an email notification when a user submits a question.

    Type a Q&A question and submit it

    Now, to answer customer questions, you need to go to the Products » All Products page from the WordPress admin dashboard.

    From here, simply click the ‘Edit’ button under a product to open up its’ ‘Edit Product’ page.

    Click the Edit button

    Next, you need to scroll down to the ‘Product Data’ section and click the ‘Q&A’ tab from the left column.

    Here, all the questions submitted on that specific product’s page will be displayed.

    Click the Q&A tab

    Now, you need to simply type the answer to a customer query in the ‘Answer’ field.

    If you want to delete a question because it’s inappropriate or irrelevant to your product, then you can also do that by clicking the Delete icon on the right corner of each question.

    You can also uncheck the ‘Approve’ option if you don’t want to display the question on the product page.

    Answer or delete the question

    After you have answered the product questions, go to the top of the page and click the ‘Update’ button to save your changes.

    Now, you can visit the product page to see the Questions and Answer section in action.

    Visit site

    We hope this article helped you learn how to add product questions and answers in WooCommerce. You can also check out our top picks for the best WooCommerce plugins to grow your store, and our beginner’s guide on how to add web push notification to boost sales.

    If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

    The post How to Add Product Questions And Answers in WooCommerce first appeared on WPBeginner.

  • Build Advanced Websites with Toolset’s Post Relationships and Repeatable Field Groups

    Post relationships allow you to create connections between your custom post types. Using them means you can eliminate data duplication, meaning each element only needs to be edited once.

    Once you have created your post relationships you, of course, will need to add content to your custom post types which will be useful for the user. One of the easiest ways to do this is by using repeatable field groups. Repeatable field groups let you add a set of fields to a custom post type as many times as you need without having to recreate them one by one.

    The post “Build Advanced Websites with Toolset’s Post Relationships and Repeatable Field Groups” first appeared on WP Mayor.

  • WooCommerce Wholesale: How to Build a B2B Store

    Using WordPress and WooCommerce to host your online store is a powerful combo. But what if you sell products wholesale? You’re going to need a more robust solution. You need a WooCommerce B2B extension.

    The post “WooCommerce Wholesale: How to Build a B2B Store” first appeared on WP Mayor.

  • Advantages of Using WooCommerce to Build Your Ecommerce Website

    WooCommerce makes it easy and affordable to offer any item or service on any website. It enables you to manage inventory, accept secure payments, sell both real and digital goods, and properly file all of your taxes.

    The post “Advantages of Using WooCommerce to Build Your Ecommerce Website” first appeared on WP Mayor.

  • Convert Your Site into a WordPress Mobile App with MobiLoud Canvas

    In this article I’ll show you how MobiLoud Canvas can help you turn your site into a dynamic WordPress mobile app.

    The post “Convert Your Site into a WordPress Mobile App with MobiLoud Canvas” first appeared on WP Mayor.