More than 1 Gallery – how!?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9297
    CSKickOn
    Member

    Hi Guys,

    I have tried going through previous support threads, but nothing seems to work.

    Right now, if I use this code…
    [show_gallery number_of_columns=”4″ post_count=”12″ image_size=”medium” filterable=”true” no_margin=”true”]

    … That code will show me every item I have put into the Gallery.

    I want to create multiple galleries grouped by the ‘Category’ I associate with each photo. So I would like a gallery that only shows the photos with e.g. ‘Charles S’ as the category. And another gallery which will only show the photos that have ‘Random’ as the category.

    Is there a way to edit this code to do that?
    [show_gallery number_of_columns=”4″ post_count=”12″ image_size=”medium” filterable=”true” no_margin=”true”]

    Ultimately I would like to make multiple Portfolios e.g. one for ‘Charles S’ and one for ‘Random’ etc. and within each project I want to display a gallery that will only show the pictures related to that key word.

    Hope that makes sense.
    thank you for your time and help
    Kindest regards
    CS

    #9308
    Veena
    Moderator

    You can use show post snippets shortcode with terms and taxonomy specified, like below.

    [show_post_snippets post_type=“gallery_item” terms=“design,cover” taxonomy=“gallery_category”]

    It is given in the documentation under the heading Post Snippets shortcode.

    #9316
    CSKickOn
    Member

    Hi,

    I have tried every combination I can 🙁
    Sorry it I am being stupid – but I cannot make it work. I am mayb not understanding this ‘terms and taxonomy’ ….
    Please see the attached screen shot.
    I have two photos in the gallery. One with assigned to the category ‘Random’ another assigned to a category ‘Charles Stewart’.

    This code howver does not work (nor any other combination I am tring):
    [show_post_snippets post_type=“gallery_item” terms=“Charles Stewart” taxonomy=“gallery_category”]

    what am I doing wrong?

    On this page: http://www.kickon.com/?page_id=96 I have this code:

    Gallery test 3
    [show_post_snippets post_type=“gallery_item” terms=“CharlesStewart” taxonomy=“gallery_category”]
    [show_post_snippets post_type=“gallery_item” terms=“Charles Stewart” taxonomy=“gallery_category”]
    

    But nothing displays on the webpage under the heading ‘Gallery Test 3’

    Thank you for your help and patience,
    Kindest Regards
    CS

    #9317
    CSKickOn
    Member

    sorry, forgot to attached pic

    Hi,

    I have tried every combination I can 🙁
    Sorry it I am being stupid – but I cannot make it work. I am mayb not understanding this ‘terms and taxonomy’ ….
    Please see the attached screen shot.
    I have two photos in the gallery. One with assigned to the category ‘Random’ another assigned to a category ‘Charles Stewart’.

    This code however does not work (nor any other combination I am tring):
    [show_post_snippets post_type=“gallery_item” terms=“Charles Stewart” taxonomy=“gallery_category”]

    what am I doing wrong?

    On this page: http://www.kickon.com/?page_id=96 I have this code:

    Gallery test 3
    [show_post_snippets post_type=“gallery_item” terms=“CharlesStewart” taxonomy=“gallery_category”]
    [show_post_snippets post_type=“gallery_item” terms=“Charles Stewart” taxonomy=“gallery_category”]
    

    But nothing displays on the webpage under the heading ‘Gallery Test 3′

    Thank you for your help and patience,
    Kindest Regards
    CS

    #9332
    Raghavendra
    Moderator

    Looks like you are dealing with portfolio items and not really gallery items. You will need to use post_type=”portfolio”, taxonomy=”portfolio_category” and terms should be comma separated slugs and not names of the categories.

    If you are not aware of slugs for your categories, you can see example of slugs shown in the some of the screenshots in this page for post categories –

    http://www.wpbeginner.com/beginners-guide/how-to-properly-rename-categories-in-wordpress/

    #9381
    CSKickOn
    Member

    Ok – figured it out.
    Unbelievable! Was nearly ripping my hair out haha

    When I was copy and pasting from example code online (to makes sure I have everything exactly correct) the apostrophe marks were not copying as actual apostrophe marks into the page source text/code!!! So the code was invalid and therefore nothing was showing!

    Lesson learnt! Type everything or ensure you are pasting correct text characters!

    This code (with the apostrophe “” marks now as actual apostrophe marks) now works perfectly!
    [show_post_snippets post_type="gallery_item" taxonomy="portfolio_category" terms="charlesstewart" number_of_columns=4 post_count=12 image_size='small' filterable=true no_margin=true]

    Thank you for your time and patience!
    Much appreciated,
    CS

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘More than 1 Gallery – how!?’ is closed to new replies.