• davidortiz34

    (@davidortiz34)


    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.

Viewing 1 replies (of 1 total)
  • Chris Huff

    (@brochris)

    I’m having a hard time visualizing from your description what you’re actually trying to accomplish with the code itself. Could you post what your code is outputting, and also what you’d like for your code to output instead?

Viewing 1 replies (of 1 total)
  • The topic ‘Shortcode to access div element’ is closed to new replies.