Multiple Posts in Featured Tabs widget

Community Forums Forums Design Tips and Tricks Multiple Posts in Featured Tabs widget

This topic is: not resolved

This topic contains 9 replies, has 3 voices, and was last updated by  matt@mattdotcom.com 1 year, 9 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #15584

    jamiebrewer
    Participant
    Post count: 2

    I’m using the Featured Tabs widget with the News child theme. Within the wp-content/themes/news/lib/widgets/tabs-widget.php file I updated the following code:

    FROM THIS
    // Custom loop
    $tabbed_posts = new WP_Query(array(‘cat’ => $cat, ‘posts_per_page’ => 1, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’));

    TO THIS
    // Custom loop
    $tabbed_posts = new WP_Query(array(‘cat’ => $cat, ‘posts_per_page’ => 3, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’));

    This was working at one point but now it’s not displaying the second two posts in the tab. It is however generating the html code for it.

    From what I can tell within the tabs ul.ui-tabs-nav the is not receiving the inline style=”display: block;”
    Any ideas how I can get this to work? Like I said it was working and then quit.

    Thanks!

    #15639

    SoZo
    Moderator
    Post count: 1573

    Please include a link to your site with all questions so that people can see what is going on.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15658

    jamiebrewer
    Participant
    Post count: 2

    here you go… thanks man!

     

    <a href=”http://gardnernews.com/” title=”Gardner News”>

    #15680

    SoZo
    Moderator
    Post count: 1573

    What has been changed since it was working? Update WP? Install other plugins?

    Looks like the script is setting it to display: none;


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15683

    jamiebrewer
    Participant
    Post count: 2

    Yeah that’s what I saw too.

    I think the wp update broke it.

    Support said: More than likely it relates to WordPress updates of jQuery and jQuery tabs. The widget uses the WordPress included libraries.

    Just looking for a fix. Maybe there’s not one:/

    #15685

    SoZo
    Moderator
    Post count: 1573

    Not without tweaking the script and I don’t know off hand specifically what you would need to change. Haven’t looked at what all was changed with jQuery 1.9 yet. Sorry.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #15827

    matt@mattdotcom.com
    Participant
    Post count: 12

    Same problem here – just realized the 3.5 update broke 3 of my sites this way!  If anyone finds a solution, please let me know!

    Matt

    #15832

    matt@mattdotcom.com
    Participant
    Post count: 12

    One other thing that has broken with that, in my Stylesheet had these lines that made the current tab selected display as the hover cover, like a a:current in a nav bar.  The hover still works correctly, but not the selected

    [code] #home-top .ui-tabs ul.ui-tabs-nav li a:hover,
    #home-top .ui-tabs ul.ui-tabs-nav li.ui-tabs-selected a {
    background-color: #cae5f0;
    color: #fff;
    }

    [/code]

    #15860

    matt@mattdotcom.com
    Participant
    Post count: 12

    Note – the error wherein the selected tab does not take on the new color is a problem on the unedited plugin – it’s happening on the NEWS Child Theme demo page as well.  Seems like the plugin itself will need an update to fix that regardless of our multiple posts hacks.

     

     

    #15867

    matt@mattdotcom.com
    Participant
    Post count: 12

    FOUND A STOPGAP SOLUTION:

    Using this code for a new plugin and deactivating the main Genesis Tabs plugin (but not deleting):  https://gist.github.com/4455461

    Then delete the current widget that wasn’t working, drop in a new one, and there is a field for “Number of posts per cat?”

    I had to re-tweak some CSS stuff, but it’s working.

    The selected-category is still not staying as the hover color though – this may be a deeper issue in the plugin.

    Matt

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.