• I have this <?php if (empty($cat)) comments_popup_link(__('Comment'), __('Comment'), __('Comment')); ?> to hide this part when a page is showing up the *categories section*.
    I need to know the variable for the *individual posts section* so I can make something appear *only* when the page is showing up the *individual posts section*. How do I write the code for that? Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I believe $p is deprecated and you should instead use $single.

    Thread Starter prara

    (@prara)

    Well my code worked. Do I still need to change the variable?

    prara, $single == $p OR $name
    $p and $name are the two possible “identifiers” for a single-entry.
    Using $single ensures that the page behaves as expected under all possible conditions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The variable for individual posts section’ is closed to new replies.