Editing posts in blocks

Posted in: Newspaper
Post count: 388

I’ve added a custom field for coauthors, followed their docs, and written some basic php. It’s working great 🙂 I’ve switched the functions in all my single templates and modules to use my coauthor display function instead of the default get_author function. I’ve tested it in every module and single template and it works.

But I’m having a hard time figuring out how to change the blocks used in the Visual Composer. I see td_block_1 through _9, td_block, td_block_layout, etc., but can’t seem to find where it actually looks up the posts.

Can you point me in the right direction??

Post count: 388

Hmm… But I did just notice that the blocks inherited some other things I did to the modules. So I guess they’re just not calling the function the way I expect. Will poke my head in a few more places.

Post count: 388

Got it! 😀 Note to self: don’t rely on Advanced Custom Fields’s have_rows() function to know what post it is if I’m in a module…

For anyone else having a similar problem with ACF: just remember to pass the function the $post object when you see the theme code using $this 🙂

Post count: 6600

Hi,

Glad you’ve done it.
Thanks for the message!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.