Home Forums Weaver Show Posts & Show Sliders Custom Posts w/ Custom Taxonomies Not Working

Viewing 16 posts - 1 through 16 (of 18 total)
  • Author
    Posts
  • #17698
    Kimmer99
    Participant

    If you could check out this page: http://pbfalv.org/employment/. I’ve got filters set up Full Time Positions (currently there are no posts that match this taxonomy), Part Time Positions (there are 2 posts that match this) and Internships (1 post matches this). Each filter should be displaying under each sub heading on that page. However, all three positions (regardless of their taxonomy) are appearing under each heading.

    My Taxonomy Name is Employment Types and its slug is employment-type. I’ve tried the custom taxonomy parameter, for example, as employment-type=part-time as well as Employment Types=part-time. Neither worked (as everything is displayed regardless of the selected taxonomy). I’ve also tried using the filter name and specifying each parameter in the short code on the page.

    Any suggestions as to how to format that parameter so it works or any other issues that may be occurring?

    Thanks,

    #21741
    scrambler
    Moderator

    It is hard to follow what you are doing.

    You are using Weaver Show Post plugin to display certain posts.

    Are these regular posts of a certain category, or custom Post types of a certain taxonomy?

    If custom post type of a certain taxonomy, you must specify two things in the filter options.

    1- The post type option value to select the custom post type

    2- The Custom Taxonomies option to select the taxonomies of the post type selected above

    SO to check syntax, you need to give us the Custom Post type Slug, and the taxonomy slug

    Fro Nb 2, if your taxonomy slug is  employment-type, and its value slug  is part-time, I believe the syntax would be

    employment-type=part-time

    #21742
    Kimmer99
    Participant

    Custom Post Types of a certain taxonomy.

    Here you can see the filter name:

    Here you can see the post type:

    Here you can see the taxonomy:

    And here you can see the short code on the actual page, when using the Add [show_posts] function:

    #21743
    scrambler
    Moderator

    If you have made sure the slugs are correct, I am not sure. @weaver may have more ideas

    #21744
    Kimmer99
    Participant

    The form you complete (see images above), show the slugs so I’m assuming they are correct. Thanks for looking. Hoping @weaver will chime in.

    #21745
    Weaver
    Keymaster

    I don’t know what to say.

    I just used the WCK post type and taxonomy creator to create a custom post type with associated custom taxonomy. I created an appropriate filter with Show Posts, and added the short code. It all works perfectly.

    So, the only suggestion I can make is are you 100% sure that the ‘part-time-employment’ post type really has the associated taxonomies?

    #21746
    Kimmer99
    Participant

    Wait, the post-type is job-listing (see above), the taxonomy is Employment Type (slug is employment-type) of which one of the possible taxonomies is part-time. What’s happening is the filter not only shows all job listings that have the taxonomy part-time, but also have the taxonomy internship (basically, the taxonomy parameter is not working).

    Did you test a custom post type, that has multiple taxonomy possibilities of which you only want to show one? 
    So, Custom Post Type is Job Listing
    Taxonomy is Employment Type which can have one of these four values:
    full-time
    part-time
    Masters
    Internship
    I want a different filter for each possible taxonomy value.
    #21747
    scrambler
    Moderator

    I just made a test with a custom post type and a few taxonomies and it works fone for me.

    I suggest you make the following test

    • Create a new custom Post type name test
    • Create two posts of that post types called test-1 and test-2
    • Create One taxonomy for that custom Post Type called    test-taxo
    • In that taxonomy create 2 of them taxo-1  and taxo-2
    • Give the taxonomy taxo-1 to the post test-1 and the taxonomy taxo-2  to the post  test-2
    • Create a new filter called test
    • in Post type select test
    • Insert the Show post filter in a test page, verify the page shows both test-1 and test-2 posts
    • Edit the test filter, in Custom Taxonomy type    test-taxo=taxo-1
    • Save the filter settings and verify that the page now only shows the post test-1

    #21748
    Kimmer99
    Participant

    Okay – sorry – finally got back around to this. I did as you suggested Scrambler, unfortunately, it still shows both posts.

    #21749
    Kimmer99
    Participant

    Another update, I’ve changed the custom post type to use categories for now, and that seems to work.

    #21750
    Kimmer99
    Participant

    Further update – and this is the real answer.

    Here’s the issue: when the taxonomy was named test-taxo, this filter did NOT work (step three in Scrambler’s steps above). When I changed the name (and slug) to test_taxo (underscore instead of hyphen), it did work. Not sure if this is a help to anyone but be aware it appears hyphens do not work in the taxonomy name.

    #21751
    scrambler
    Moderator

    Thanks for reporting back. @weaver can let us know if this is normal

    #21752
    Weaver
    Keymaster

    Normally, dashes are widely used for slugs, so that would be a puzzle. Perhaps it is related to the specific taxonomy creation plugin you are using?

    #21753
    Kimmer99
    Participant

    Not sure – but when you tested it are you sure you used a hyphen for the taxonomy not an underscore? The reason I mention it (and thought to test it), is when I looked at all the filter parameters I noticed they all use underscores (e.g., post_type, category_name). Even the default text in the taxonomy field, defaults to using custom_taxonomy_name with underscores – that’s what gave the idea to change my taxonomy name to use underscores instead of hyphens.

    BTW – I’m using Types for my custom post types and taxonomies.

    #21754
    scrambler
    Moderator

    I am using types, and I can reproduce the problem. If I use a hyphen in the taxonomy slug it does not work

    #21755
    Weaver
    Keymaster

    I guess the “solution” would be to not allow dashes in the filter fields.

    @scrambler – which filter option fields need that check? Most of them show a list of acceptable values now, so don’t know if that can change or not.
Viewing 16 posts - 1 through 16 (of 18 total)
  • You must be logged in to reply to this topic.