• Resolved csalasco

    (@csalasco)


    Hello,

    I am using a wordpress plugin called Content Parts. The plug allows me to break up content in the page editor flexible pieces that can be arranged in the WordPress php editor.

    I’m working in the front front-page.php file.

    Highlighted coded below:

    https://gyazo.com/167a0cdb73ce6cb360dffe97a7155c78

    The Site: https://myonemedical.com/

    the_content_part ( 1 ) corresponds to the first section that contains the headshot, name, and copy.

    the_content_part ( 2 ) corresponds to the second row and so on.

    etc

    What I’m having trouble with is assigning div tags to style each part specifically.

    I’ve tried using this in the php file:

    <div id=”hk”><?php if ( function_exists( ‘the_content_part’ ) ) the_content_part( 2 ); ?></div>

    and this in the css stylesheet:

    #meet {background:#ffffff;}

    But there’s no change.

    Can someone help me understand what I’m missing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Maybe I’m confused but in your example above the PHP is assigning an id=”hk”, and in the CSS your styling an id = #meet?

    Thread Starter csalasco

    (@csalasco)

    Oh I apologize! Those are for different sections.

    I have a #hk css tag and an #meet tag. I meant to use one or the other as an example.

    But they still don’t work.

    Thread Starter csalasco

    (@csalasco)

    Nevermind I got it to work! Thanks ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What was the solution if you don’t mind me asking?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Div tags don't work, need help ASAP’ is closed to new replies.