• This plugin really does what i need. But i have one question.. When i open my website in Firefox, the content of the tabs, is displayed first at the top of my page,than (after 2 sec) it goes to it’s place inside the tab. This happens every time i click on a different tab. Looks like a javascript issue but haw can i fix it?
    Apart from this..great plugin!
    Thanks for sharing ??

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author metaphorcreations

    (@metaphorcreations)

    I’ll take a look at this issue. Thanks for letting me know!

    i’m having the same issue on a twentythirteen theme.

    … apart from being always in need of a custom templating option, to avoid hacking plugin ??

    Plugin Author metaphorcreations

    (@metaphorcreations)

    @maxgx – What version of the plugin are you using?

    hi, i’m using version 2.1.0
    i was referring to this thread here
    i know i can manipulate the output in functions.php, but i think it’d be much easier with custom templates, as we may define many of those without littering the functions.php file.
    i mentioned cos you seemed to like the idea too… ??

    Plugin Author metaphorcreations

    (@metaphorcreations)

    I understand what you are saying, but there just isn’t a very good way to create a template for shortcodes (like using the get_template_part function in your theme) as there isn’t any way to pass data to a template (all the different args that can be set for the shortcodes).

    But, even without templates, you don’t need to modify the plugin files (if that’s what you where referring to). There are many built in filters you can use to modify the output of the shortcodes, or you can also completely rework the shortcode by using

    remove_shortcode( 'mtphr_post_slider' )
    add_shortcode( 'mtphr_post_slider', 'mycustom_post_slider_display' );
    function mycustom_post_slider_display( $atts, $content = null ) {
     .... copy, paste and modify the actual code here
    }

    If you are worried about having a big functions.php file due to modifying a lot of the shortcodes through filters, I would suggest creating a new file specifically for your shortcode filters and just add a single line to your functions.php file in order to include the new file:

    require_once( get_template_directory().'/shortcode-filters.php' );

    … feel free to name the file anything you want or place it in a sub-directly… whatever makes sense for your organizational purposed.

    thanks Joe, with your input i managed to insert the function into functions.php and get the desired output, with a twentytwelve-styled footer:

    function custom_post_block( $block, $excerpt, $args, $permalink=false ) {
    echo '<article id="post-'.get_the_id().'" class="post type-post status-publish format-standard">';
    	if( $args['thumb_size'] != 'none' ) {
    	echo '<a href="'.get_permalink().'">'.get_the_post_thumbnail( get_the_id(), 'opening-thumb' ).'</a>';
    	}
    	echo '<h3><a href="'.get_permalink().'">'.get_the_title().'</a></h3>';
    	echo '<div class="entry-summary"><p>'.get_the_excerpt().'</p></div>';
    echo'<footer class="entry-meta">';
    
    //comments
    echo '<span class="comments-link"><a title="Commenti a '.get_the_title().'" href="'.get_permalink().'/#comments">'.get_comments_number( get_the_id() ).'</a></span>&nbsp;|&nbsp;';
    //postdate
    echo '<span class="meta-date"><a rel="bookmark" title="'.get_the_time( 'H:i', get_the_id() ).'" href="'.get_permalink().'"><time datetime="'.get_the_time( 'Y-m-d', get_the_id() ).'T'.get_the_time( 'H:i+00:00', get_the_id() ).'" class="entry-date">'.get_the_time( 'd/m/Y', get_the_id() ).'</time></a></span>&nbsp;|&nbsp;';
    // categories
    $catslist = get_the_category_list(', ' , get_the_id() );
    echo '<span class="meta-cats">'.$catslist.'</span>';
    echo '</footer>';
    echo '</article>';
    }
    add_filter( 'mtphr_post_post_block', 'custom_post_block', 10, 3 );

    i suspect this will format all mtphr_post_post_blocks in this fashion, so it’d be good to know if there was a way to differ from mtphr_post_post_block to mtphr_post_post_block (hence my request for custom templates), but for the scope i needed it, it does the job just fine!

    with regards to the original question of this post, have you found a solution to the strange behavior of content in tabs?
    eventually tabs do work fine, but it seems like content is dropped into tabs from the sky ??

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Within the filter you can still exclude or include specific posts by their ID or other post attributes.

    Use something like:

    function custom_post_block( $block, $excerpt, $args, $permalink=false ) {
      // By id
      if( get_the_id() == 50 ) {
        // put your code in here
      }
      // ... or by category
      if( has_category('my_category') ) {
        // put your code in here
      }
      // ... or, whatever determining factors your need to only modify the posts you need
    }

    As for the tabs, are you using the latest version of the shortcodes? I am pretty sure this was fixed a couple version ago… but, maybe I need to recheck again.

    thanks for the tip on the function.

    as for the plugin version, i’m using version 2.1.0, looks like it’s the latest.

    Plugin Author metaphorcreations

    (@metaphorcreations)

    Ok, yes, that’s the latest version. I’ll check it out again sometime this week.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Firefox compatibility’ is closed to new replies.