Tagged: , ,

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #301268

    Hi,
    I’d like to use the masonry tiles to display some text & general content, so i would like the tile to not be clickable, but only some of them, specified via a checkbox in the post editor perhaps ?
    Can you guys point me in the right direction ?
    Cheers.

    #301416

    Hello!

    It is possible but it would require a heavy customization to the theme, unfortunately that’s beyond the scope of the support we can offer. If you really need it try contacting a developer.

    Cheers!
    Josue

    #301607

    I figured full code might be too much to ask, but do you mind telling me which files to look into ? I can add the checkbox and do that part, but i can’t find the right file to edit how masonry works.
    For example, changing the way masonry outputs different post types or formats ? For example, make the quote post format not clickable, or a custom post type?

    #301780

    Hey!

    You’d need to create a new metabox so you can bind a value to the post (that checkbox for example), you can use this plugin to do that:
    https://wordpress.org/plugins/meta-box/

    Once you done that you can use that data to conditionally disable the link on the masonry title, look for the html function located in /config-templatebuilder/avia-shortcodes/masonry_entries.php, line 456.

    Best regards,
    Josue

    #302673

    Thanks a lot Josue, helped me solve it.
    For anyone else that might be interested, here’s how.

    the line to edit is #678, that is this :
    $this->loop[$key]['url'] = get_permalink($id);
    I have a custom post type called “tile”, so for those i want to disable the link. That is done with this conditional added to immediately after the line above
    if (strpos($this->loop[$key]['url'], '/tile/') !== FALSE) $this->loop[$key]['url']='#';
    This checks if /tile/ is in the url, which for custom post types it would be (replace tile with your own custom post type) and if it finds it, it replaces the link with a simple #. Adding this rather than changing the line above ensures the links still work for all other post types (folio, blog, etc)

    • This reply was modified 9 years, 7 months ago by radugidei.
    #302839

    Nice workaround, glad i could help :)

    Cheers!
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Masonry tiles with no link’ is closed to new replies.