• Hi there

    I have a couple of different custom post types in my site – for job vacancies and tenders respectively. I need to display just the titles of of each post in a particular post type in the the sidebar.

    I have done so by using the following code in my sidebar.php file.

    This works well, but I need to display alternate content if there are no vacancies or tenders.

    • Either by having an alternate li that simply says, ‘No vacancies’
    • Or just not displaying the entire section if there are none. (Which I don’t know how to do…)

    Any help would be appreciated. So thank you in advance.

    Jon

  • The topic ‘Display Custom Post Types titles in sidebar.’ is closed to new replies.