• Resolved Lightpurple

    (@pamkaur14)


    Hi,

    I have just tried using 3 shortcodes on 1 page and it doesn’t seem to working. I have pasted the following shortcode in the first row:

    [display-posts tag=”featured female” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    and tried this:

    [display-posts tag=”featured male” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    in the next row and it is still showing the ‘featured female’ posts. I also tried the following shortcodes:

    [display-posts tag=”featured+male” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    and:

    [display-posts taxonomy=”post_tag” tax_term=”=”featured, male” tax_operator=”AND” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    and still no change. Can I use the shortcode 3 times on the one page?

    Cheers.

    https://www.ads-software.com/plugins/display-posts-shortcode/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Lightpurple

    (@pamkaur14)

    I have also tried:

    [display-posts tax_(count)_operator=”AND” taxonomy=”category” tax_term=”male” taxonomy_2=”post_tag” tax_2_term=”featured” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    Still the same. Even though I have select ‘featured female’ (1 tag) for the top row, it is also showing ‘featured male’ posts.

    Thread Starter Lightpurple

    (@pamkaur14)

    I have solved the problem. The shortcodes I copied from the plugin website is ‘corrupted’ by styling, ie. bold and font style.

    When I went into the ‘Text’ section of the post edit page, I saw that the shortcode had stuff like ‘stong’ and <span style…> in it. So when I took all of that out of the ‘text’ shortcode, it worked fine. You should change this on your website to remove all the formatting from the shortcode wording so as not to cause others problems like mine.

    I would also like to add that when I used this shortcode:

    [display-posts tag=”featured female” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    it didn’t work for me. I had to set it up like so:

    [display-posts taxonomy=”post_tag” tax_term=”featured female” post_status=”publish” image_size=”thumbnail” posts_per_page=”5″ orderby=”rand”]

    and then it worked. Hope this helps others in the future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't work multiple tags in shortcode’ is closed to new replies.