WordPress.org

Ready to get started?Download WordPress

Forums

CSS if/then for page template (3 posts)

  1. hpgray
    Member
    Posted 1 year ago #

    I have this if/then statement:

    if(is_page('2')) :
    else :
    	get_sidebar();
    endif;

    which works great for page 2. What is the if/then statement if I want it to apply to all pages using a particular page template?

    Thanks!

  2. Pankaj Pandey
    Member
    Posted 1 year ago #

    this link may help
    is_page_template

  3. potentweb
    Member
    Posted 1 year ago #

    Are you asking if you can do that dynamically without keep adding else if?

Topic Closed

This topic has been closed to new replies.

About this Topic