• Ultic

    (@ultic)


    Hi.

    I would like to make a website where I have my galleries listed in the sidebar, and when a gallery within the sidebar is clicked, the relating thumbnails show up in the main content page are. This behavior I have managed to produce by editing sidebar.php and crating a custom template, based on the condition “$url = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]” I echo the short code I would like.

    However….I want the sidebar galleries to stay as galleries when they are clicked, and only main content page displaying the thumbnails.

    When a gallery is clicked, I manage only to get thumbnails in both sidebar and main content page or only main content page in main content page, no matter if the code in sidebar is static or dynamic.

    It’s as if Nextgen will not allow two different “do_shortcode” based on the condition “$url = “http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”

    Do any one have an idea on how I can reach my goal?

    Thanks in advanced for your help.

    https://wordpress.org/plugins/nextgen-gallery/

    [Moderator Note: No bumping, thank you.]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @ultic – Rather than extensive custom code, have you tried any of the plugins that offer conditional display of widgets? This does read as though that is what you are trying to accomplish and it may be much easier to work with that idea instead.

    – Cais.

    Thread Starter Ultic

    (@ultic)

    @cais, thanks for taking your time to answer.

    I have now looked into the plugin “Conditional Widgets” and “Dynamic Widgets”, however I felt it doesn’t bring me what I would like, though interesting plugins!

    The sidebar I only want for navigation between galleries, but the content(thumbnails) of the galleries is to be displayed in the main content area.

    Let’s say that in the sidebar widget I have [album id=1 template=extend]. When a gallery from [album id=1 template=extend] is clicked, the sidebar will display the corresponding gallery, as [nggallery id=X], what is standard behavior.
    If I instead link every gallery to a separate page with [nggallery id=X], I have the functionality I would like.
    Then sidebar will still output [album id=1 template=extend] and the main page [nggallery id=X]. But the downside is that it would require that I manually create a page for every gallery and link it, and I have do hide the page from showing up in the menu(as this I don’t want)

    Where can I perhaps block globally the behavior that [album id=X template=extend] is resolved into [nggallery id=X], and just instead stay displayed as [album id=X template=extend], though with a unique link pr. gallery?

    Plugin Contributor photocrati

    (@photocrati)

    @ultic – If I am reading this correctly, you are aware of what the plugin does and how to get it to do what you want with its built in functionality (which I must say is an interesting and well thought out idea).

    Now, you want to know how to essentially “break” this standard functionality you are using (or are describing) to do this differently but still end up with the same end results?

    I would not recommend modifying any of the plugin’s core code, but you may be able to create a custom template and/or custom display that will do what you are expecting. Unfortunately our documentation on custom displays is still in need of an update and that may still be a little while before we get to that as there are still many pressing issues our developers need to address first.

    – Cais.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multiple shortcodes at the same time?’ is closed to new replies.