• Resolved mikehermary

    (@mikehermary)


    We are building a network site for municipalities. Each municipality will be a child site that exists within a province. In the province, these municipalities are grouped by regions. We would used the ACF options pages to assign a region number to each child site after they are created. The number of regions should be limited to six or seven.

    Is it possible to have Broadcast via add-on packs or hooks/filters broadcast posts to child sites that share a specific region number (ACF field)?

    Cheers,

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    It looks like my code snippet about condition broadcasting depending on custom fields can help.

    https://broadcast.plainviewplugins.com/snippet/conditional-broadcasting-custom-field/

    (Strange, I replied to this directly after you wrote it but my reply never appeared for some reason. I guess copy/pasting into this new comment editor doesn’t work properly.)

    Thread Starter mikehermary

    (@mikehermary)

    Thanks for the reply and sharing the snippet.

    I need some clarification regarding the snippet:

    1. Does the blogs array require me to enter all of the IDs used for child sites on the network? The in-development website will have around three hundred child sites that would be connected by a numerical region stored in an ACF field. Or can it be captured using a dynamic value?
    2. I have created a custom field (ACF) called “Region” and have attached it to both Posts and Options sections. The meta_key and meta_value of a specific region number were hardcoded into the function, but only worked when connected to Posts and not Options. Should this functionality work on ACF Option pages?
    3. When testing a broadcasted post, nothing is displayed in the Broadcast column on the posts listing screen after being handle programmatically. Is this the expected result?

    Cheers,

    Plugin Author edward_plainview

    (@edward_plainview)

    1. Your webdev can just modify the code to get another custom field value and broadcast off of the values in that field instead.
    2. Options pages do not use the save_post action, which the snippet hooks into, so broadcasting of options pages doesn’t work.
      The ACF add-on handles broadcasting of options pages.
    3. On neither site, neither the child site nor the parent site? Maybe broadcasting was interrupted before the linking could occur. Don’t know why that would happen. A fatal error? To find out, enable Broadcast debug mode, broadcast the post programmatically, and then send me the long, long debug file to read through. That will tell me what is going on.

    [email protected]

    Thread Starter mikehermary

    (@mikehermary)

    Thanks for reply.

    We will need the add-on for the options pages functionality, so we will get that purchased in the future.

    Cheers,

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