Custom Fields
Re-Envisioned
Support MB Term Meta Display custom terms image_advanced on page frontend

  • Creator
    Topic
  • #4825
    Resolved sergeysemenov
    Participant

    Hi. I need to create a block on my homepage which displays image_advanced and text fields of my custom terms. When new term is created it must appear in that block. The way to add them with post_id isn’t good as new terms metaboxes must appear. Is there a way to get this range?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #4826
    Anh Tran
    Keymaster

    Hi Sergey,

    Do you mean showing the meta boxes when creating in a new term, not when editing a term? And I’m quite confuse about “post_id” here, what do you mean by that?

    #4829
    sergeysemenov
    Participant

    Yes. All fields are created. Image_advanced and text field for each term of taxonomy. I need to output these pre-made fields for each term on homepage. Then, when I create a new term in the same taxonomy and fill my pre-made fields, they must output automatically.

    #4845
    Anh Tran
    Keymaster

    I got it now. Looks like that’s the same problem in the new topic. As I said in that topic, depending on your code, you should get the term ID somehow, and use the function get_term_meta to get the uploaded images.

    And as the documentation says, the value stored for image_advanced field is an array of image IDs. You need to use a helper function like wp_get_attachment_image_url() to get the image URL.

    Here is a sample code:

    https://ghostbin.com/paste/vny57

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.