Shortcode to access div element
-
Hello,
I just created a shortcode where it takes the featured image from that page and puts it behind the content of the page as a background image. Because the shortcode goes something similar to this .
if post has thumbnail then { <div class="content-wrapper wrapper"> //shortcode here </div> }
The problem I’m having is I want the thumbail to target the wrapper. Instead what it’s doing is just placing it inside of the wrapper div which is essentially inside of a container.
I’m not the best programmer, but I’m pretty sure I’m doing something wrong. How do I create a div wrapper in which the the thumbnail image would target that instead. The shortcode is outputting everything correctly I don’t need help writing one, however inside the base.php file everything is inside of a container and I think that is the problem.
- The topic ‘Shortcode to access div element’ is closed to new replies.