[Support request] Switch off masonry on specific taxonomies

Home Forums Support [Support request] Switch off masonry on specific taxonomies

Home Forums Support Switch off masonry on specific taxonomies

Viewing 15 posts - 16 through 30 (of 33 total)
  • Author
    Posts
  • #649764
    Hans

    Hi Tom,

    thanks for your ongoing help. Two points:

    – I want to have three columns instead of one – as they are in posts.
    – Why have the menu points ‘Beisitzer’ and ‘Beisitzer AsF UB …” in ‘Examples’ three columns and are not masonry?

    I appreciate your support very much.

    #650016
    Tom
    Lead Developer
    Lead Developer

    Really strange that columns are turning off if masonry is turned off. I’m going to need to look at tat in the core plugin.

    I wonder if it would be easier to apply masonry to a set of taxonomies instead of excluding them. Would that work for you?

    Those two pages are still using masonry.

    #650116
    Hans

    Hi Tom,

    excluding is in my view the only way as there are many categories and tags which are or may be used with masonry. The only way could be to exclude all taxonomies of post type ‘mitglieder’. Is there a way to do this?

    I definately want to use three columns. For the time being I fixed the size of images – but this is no solution as title might have two lines in smaller views.

    #651266
    Tom
    Lead Developer
    Lead Developer

    Looking into this – seems there might be a bug in the plugin I need to figure out.

    Will let you know.

    #671958
    Hans

    Hi Tom,

    is there any news???

    #672233
    Tom
    Lead Developer
    Lead Developer

    Hi Hans,

    Sorry – not yet! I’m hoping to get it fixed for 1.7.3 which will be released soon. Will update you as soon as I have something ๐Ÿ™‚

    #674801
    Tom
    Lead Developer
    Lead Developer

    I have this fixed in 1.7.3.

    If you’re comfortable modifying code, I can give you instructions to add the fix for now.

    Let me know ๐Ÿ™‚

    #674971
    Hans

    Hi Tom,

    that would be great!

    #675589
    Tom
    Lead Developer
    Lead Developer

    Open up: wp-content/plugins/gp-premium/blog/functions/columns.php

    On line 63, right above return $masonry;, add this:

    if ( false === apply_filters( 'generate_blog_masonry', 'false' ) ) {
        $masonry = 'false';
    }

    Then in your custom functions, add this function:

    add_action( 'wp', function() {
        add_filter( 'generate_blog_masonry','tu_portfolio_masonry' );
    } );
    
    function tu_portfolio_masonry( $masonry ) {
        $taxonomies = array(
            'some-taxonomy',
            'another-taxonomy',
            'one-more',
        );
    
        if ( is_tax( $taxonomies ) ) {
            return false;
        }
    
        return $masonry;
    }
    #675686
    Hans

    Hi Tom,

    great – it works. But it must be: return true. It was no problem to correct this.

    #675787
    Tom
    Lead Developer
    Lead Developer

    return true will enable masonry within those taxonomies.

    #687128
    Hans

    Hi Tom,

    unfortunately I have to come back to this problem. It is not solved as you can see on the attached images.

    This image shows the screen with masonry “true”.

    masonry true

    This image shows the screen with masonry “false”.

    Masonry false

    This is the only difference in the code. Nevertheless the three columns are lost and only one column is used.

    #687287
    Tom
    Lead Developer
    Lead Developer

    Can you show me your complete code as of now?

    #688155
    Tom
    Lead Developer
    Lead Developer

    Have you tried returning false on the pages where you don’t want masonry instead of returning true on pages where you do?

    #688292
    Hans

    Yes, I did. What I want to achieve is really simple:

    I want to display three columns and all boxes should have the same size independant of the length of the heading – see first picture.

Viewing 15 posts - 16 through 30 (of 33 total)
  • You must be logged in to reply to this topic.