Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #545866

    Hi,

    we display entries from categories with masonry gallery.
    it displays thumbnail and title from a entry.

    we dont want to link to the main entry.
    the elements in the gallery should link
    to a pdf-file, which link is provided by a custom-field in each entry

    #546011

    Hi quebag!

    Around line 402 in the /enfold/config-templatebuilder/avia-shortcodes/helper-masonry.php file you should see where the link is set.

    $this->loop[$key]['url']			= get_permalink($id);
    

    You could try using this function to grab a custom field from the post, https://developer.wordpress.org/reference/functions/get_post_meta/.

    It’s most likely going to take a bit more work than that though.

    Best regards,
    Elliott

    #546341

    sorry,
    custom fied = dateilink

    how must i setup the code
    $this->loop[$key][‘url’] = get_permalink($id);

    #546661

    Hey!

    Maybe this would work.

    $this->loop[$key][‘url’] = get_post_meta( $id, 'dateilink', true );
    

    Best regards,
    Elliott

    • This reply was modified 8 years, 11 months ago by Elliott.
    #546846

    great. thank you !!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Masonry Gallery + link to file’ is closed to new replies.