Last active
July 8, 2022 06:58
-
-
Save wplit/fe52b0b2c5951524c4182a27c65180c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Result in builder after adding in image.. notice the image isn't between the links