• Resolved Aimee

    (@greatdanemaniac)


    Hi!
    I noticed a while ago that the awesome code line get_the_terms_list doesn’t seem to work anymore for taxonomies. As long as I only have one taxonomy, then it works fine, but when I add more such as:

    echo get_the_term_list( $post->ID, 'language', '<li>Language: ', ', ','</li>' );
    echo get_the_term_list( $post->ID, 'subject', '<li>Subject: ', ', ','</li>' );

    etc,

    Then the front page (or the used page template) crashes and cuts my page in half, leaving out the sidebar and everything.

    This has left me to give up on custom post types and taxonomies all together.

    I have an awesome tutorial on taxonomies and cpt’s and this has worked before, but suddenly it does not.

    I’ve begun to think of certain plugins that I can use instead, but it seems like a dead end. There are two plugins that could fix this, but the first one (by yoast) only works with regular posts, and the second one (also called simple taxonomies like the one by yoast) doesn’t work at all.

    Can somebody please help me with this?

Viewing 9 replies - 1 through 9 (of 9 total)
  • As long as I only have one taxonomy, then it works fine,

    does it work with either of the taxonomies?

    do you use
    <ul> tags around your code?

    ‘crashes’ – is the rest of the content still in the html code in the browser?

    do you have a link to the site with the problem?

    Thread Starter Aimee

    (@greatdanemaniac)

    Hi!
    Hmm… I checked now and I do not have a
    <ul> around the code. I might have had that before, when I come to think of it.

    As of now, I’ve stopped using taxonomies and cpt’s all together, but after you mention the <ul> thing, I’ll try it and I’ll get back to you.

    Thank you for your reply!

    Thread Starter Aimee

    (@greatdanemaniac)

    The problem remains, even though I have a

      tag around the code. I can show you an image of the problem. The CPT is in swedish, so just ignore that fact. The problem is still the same. I just used the subject and language taxonomies from the post as examples.

    https://greatdanemaniac.com/public_html/images/foder%20cpt.PNG

    Thread Starter Aimee

    (@greatdanemaniac)

    The problem remains, even though I have a
    <ul> tag around the code. I can show you an image of the problem. The CPT is in swedish, so just ignore that fact. The problem is still the same. I just used the subject and language taxonomies from the post as examples.

    https://greatdanemaniac.com/images/foder%20cpt.PNG

    is the rest of the page (i.e. the html code of the second ‘get_the_terms_list’ and the footer) still in the browser, just not on the screen?

    in which case, it could be a css problem.

    check with ‘view’ ‘source’ in the browser

    any single use of ‘get_the_terms_list’ either with ‘language’ or ‘subject’ would be ok?

    Thread Starter Aimee

    (@greatdanemaniac)

    I just checked, and no. It just stops after the first taxonomy.
    In this case I have added several taxonomies, but only the first one is displayed.

    if I use only one (and only that one registered as well) it works fine.

    Here’s a link:

    https://test.greatdanemaniac.com/foder/

    Thread Starter Aimee

    (@greatdanemaniac)

    I temporarily got it to work, but I’m not satisfied yet. It seems to work with the twentyten theme, but I mainly use a child theme from the theme coraline… I’ll take another look at it tomorrow.

    Thread Starter Aimee

    (@greatdanemaniac)

    Looks like it’s impossible to fix with the coraline theme. I think I will give up on using taxonomies. This case is resolved.

    Btw. Please remove one of the duplicate posts I made earlier. It contains a broken link. Thank you.

    Thread Starter Aimee

    (@greatdanemaniac)

    I solved it!

    Just had to change from get_the_term_list to simply the_terms.

    Glad it worked out…

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘get_the_terms_list doesn't work anymore’ is closed to new replies.