• Resolved Silvanovicz

    (@silvanovicz)


    On the single pages i’m happy to use the current shortcode displaying number of shared and two big share buttons.

    But for the homepage, I’d like to display only the number of shares. Is there a shortcode or PHP snippet to only bring up the number of shares without the share buttons?

    https://wordpress.org/plugins/mashsharer/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Write in your style.css:

    .mashsharer-buttons {
    display: none !important;
    }

    Thread Starter Silvanovicz

    (@silvanovicz)

    wouldn’t that mean that the share buttons don’t show up on other pages as well? On the front page I only want to show the number, but on the single pages, i’d like to show the number of shares + the share buttons.

    Ohh soory i didnt understand. Now i do.
    Thats not possible without custom programming.

    An easy way would be to inject a custom css file only on the frontpage.

    Create a css file called mashsharer-custom.css, put the code in it:

    .mashsharer-buttons {
    display: none !important;
    }

    Upload it to the root of your theme folder.

    Put the following code in your functions.php:

    if (is_front_page()){
    if( !is_admin()){
    function mashsharer_custom_add_styles() {
    wp_register_style(‘mashsharer_custom_style’, plugins_url(get_template_directory_uri(). /’mashsharer-custom.css’, __FILE__));
    wp_enqueue_style(‘mashsharer_custom_style’);
    }
    add_action( ‘wp_enqueue_scripts’, ‘mashsharer_custom_add_styles’ );
    }

    Advantage: Its update save!

    Thread Starter Silvanovicz

    (@silvanovicz)

    ah fab. I’m not much of a PHP coder, but there seems to be a syntax error in the line

    wp_register_style('mashsharer_custom_style', plugins_url(get_template_directory_uri(). /'mashsharer-custom.css', __FILE__));

    But I can’t work out what the error is. Am I supposed to replace __FILE__ with something?

    Please try this:

    wp_register_style('mashsharer_custom_style', plugins_url(get_template_directory_uri(). /'mashsharer-custom.css'));

    still not working 🙁

    What is not working asoutiyal? If your counts are zero use an API key.

    actually i want to show only total shares in homepage, but the above code is not working… its giving a blank home page…
    btw nice plugin, was using it from very 1st day.

    hope you can update the plugin and provide us another shortcode that will only show number of shares.. like [mashshare_total]. that would beeasy for us.

    I put it on my agenda for a future update.

    hope to get update soon…

    Jeff

    (@photoreview)

    Use this:

    .home .mashsharer-buttons {
    display: none !important;
    }

    My count is always in 0 since the update. What can I do?

    Are you using an Api key? You can sen me a screenshot of your settings to info [at] mashshare.net

    Btw. i am releasing today another larger update with a new share engine.

    Hello Rene.
    I guess I can wait for the new update.
    I´ll let you know what happend with it.
    😀

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Show just the number of shares’ is closed to new replies.