Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi Viktor,

    Unfortunately, this is currently not possible with NextCellent. I didn’t even know this was possible.

    I will do some research to see if this can be included in NextCellent in the future, but no promises. You can track progress here: https://bitbucket.org/niknetniko/nextcellent/issue/2/use-post-format-in-nextcellent

    Just out of curiosity: for what purpose do you need this? This can help determine how we can implement this in NextCellent.

    Thread Starter Viktor Adorjan

    (@misuracing)

    Hi Niknetniko,

    First of all thank you very much for taking care of the plugin and also for paying attention to this feature request. ??

    I’m building a site with the Enlightenment theme which features a nice microblogging interface with post format support. You can see an example for a Gallery post type (please scroll down a bit).

    https://demo.onedesigns.com/enlightenment/?page_id=1871

    The theme documentation says that

    For posts with the “Gallery” format, the first [gallery] shortcode is extracted and displayed in place of the post’s content followed by the excerpt:

    For the time being I’ll keep using the regular post format and write a few lines before embedding a NextCellent shortcode but this way there will be a featured image and/or an excerpt on the main blog page and not this nice small grid layout. It is only a small compromise but if there was a way to implement this, it would be welcomed. ??

    Thanks!

    I see why this would be useful. However, after some research, I’ve found the following:

    Post formats are theme functions, and it’s generally up to themes to implement them. After investigating the code of the Enlightenment theme, I’ve found that while there are a lot of hooks and filters to use, there is almost no documentation (at least that I found) for developers.

    So, I’ve contacted the theme developers to see if they can be of help, but since I’ll have to work with them, it can take a while.

    Thread Starter Viktor Adorjan

    (@misuracing)

    Thanks a lot for taking your time. ?? I’m not an expert in coding so please forgive me for not being fully competent in this issue but as far as I know, the availability of the post format is a core WP feature but it is up to the theme to enable it or not. So I believe that such a development may be useful for any theme developer in general.

    The shortcode being used is [gallery] which is a core WP shortcode for embedding multiple images into any post, this post format feature just enables the user to check the photos without navigating for the post itself.

    Thread Starter Viktor Adorjan

    (@misuracing)

    Just took a quick look for the demo of the Twentyfourteen WP theme, Gallery post format is supported in it too. ??

    That’s correct.

    Note that you can set the post format to Gallery when using NextCellent, but it just won’t do anything special, because that’s a job for the theme and they only support [gallery], as far as I know.

    However, NextCellent does not, and probably never will, use the [gallery] shortcode. This is because we don’t want to disable or replace any features. If someone wants to use NextCellent and regular galleries at the same time, they should be able to do it.

    Also, even if we used the [gallery] shortcode, the content that is actually rendered (the HTML) is vastly different from default galleries.

    That’s why hooks are ideal. With hooks, NextCellent can tell the theme: “Hey, [nggallery …] is a gallery! This is our format: blabla. Please render it as one!”.

    While I think there are hooks in place in the Enlightenment theme, there is no documentation, which is why I am attempting to contact them. If they provide me with enough data so I know which hooks to use, I’ll add them to NextCellent.

    Thread Starter Viktor Adorjan

    (@misuracing)

    I’ve created a child theme which may help in case there will be a custom hook that would generally enable the feature regardless the theme being used.

    Thanks a lot for taking a look into it!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Compatibility with Gallery post type?’ is closed to new replies.