WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] The post id is not working

[Resolved] The post id is not working

  • Hello i have the following code which i want, when the page id=102 to not show the sidebar.

    <?php
    $page_id = get_the_ID();
    if(!$page_id == 102) { do_action('sidebar_left'); }
    ?>

    The problem is that the sidebar is hidden from all the pages. What is the problem with that code?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] The post id is not working’ is closed to new replies.
Skip to toolbar