Skip to content

Instantly share code, notes, and snippets.

@wplit
Last active July 8, 2022 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wplit/fe52b0b2c5951524c4182a27c65180c6 to your computer and use it in GitHub Desktop.
Save wplit/fe52b0b2c5951524c4182a27c65180c6 to your computer and use it in GitHub Desktop.
/*
Trying to add links above and below nested content, echoing all seperately.
Links are shown inside builder, but they always appear above the nested content. The order of the markup not respected.
*/
public function render() {
echo "<div {$this->render_attributes( '_root' )}>";
echo "<a href='/'>Text link before</a>";
/* nested elements */
if ( class_exists("\Bricks\Frontend") ) {
echo \Bricks\Frontend::render_children( $this );
}
echo "<a href='/'>Text link after</a>";
echo "</div>";
}
@wplit
Copy link
Author

wplit commented Jul 8, 2022

Result in builder after adding in image.. notice the image isn't between the links

Screen Shot 2022-07-08 at 7 46 04 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment