Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1245960
    umbertofederico
    Participant

    Hi there – I’m currently trying to add a shortcode from the plugin “Post Views Counter” to show the views of an article in the blog meta. The link to my site is http://umbertofederico.de/leseecke/ and I’m using the Icon stack. Is it possible to get rid of the comments meta and get it to look like that?

    date / number of views ([post-views] shortcode)

    Thank you very much for your help!

    Umberto

    #1245996
    Rupok
    Member

    Hi Umberto,

    It’s not possible usually to place a shortcode there. But you can achieve this with Child Theme for the native blog posts. But you are using The Grid and unfortunately we can’t control the functionality of that plugin as it’s not managed by Themeco. If you need to do this for native blog posts, let us know. We’ll point you the right file to place your shortcode.

    Cheers!

    #1246001
    umbertofederico
    Participant

    Well ok – tell me where I would edit the file. Maybe I can use it.

    #1246049
    Rupok
    Member

    Hi there,

    Are you using the native blog anywhere? Could you point us the page URL? Usually this is the code that you need to add under Child Theme’s functions.php :

    // Entry Meta
    // =============================================================================
    
    if ( ! function_exists( 'x_icon_entry_meta' ) ) :
      function x_icon_entry_meta() {
    
        $date = sprintf( '<span><time class="entry-date" datetime="%1$s">%2$s</time></span>',
          esc_attr( get_the_date( 'c' ) ),
          esc_html( get_the_date() )
        );
    
        if ( x_does_not_need_entry_meta() ) {
          return;
        } else {
          printf( '<p class="p-meta">%s</p>',
            $date
          );
        }
    
      }
    endif;

    You need to add the shortcode using do_shortcode() function on appropriate place.

    Thanks!

    #1246050
    umbertofederico
    Participant

    I’m not using the native blog right now but I’m gonna save that code for later reference, should I ever go back to native. Thank you very much!

    #1246077
    Rupok
    Member

    Great. Let us know if you need any other assistance.

    Cheers!

  • <script> jQuery(function($){ $("#no-reply-1245960 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>