• Good day,

    I have this line of code on my sidebar.php file in WordPress:

    <?php if($post_name == ‘coaching’): ?>

    This declares a custom sidebar content once the page is visited. The problem here is that I’d like to add additional pages for this custom sidebar to appear. What should be the correct code that I’ll use?

    Thanks for the help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Adding more pages to a custom sidebar php if code’ is closed to new replies.