Support » Plugins » Hacks » Can you see the flaw in my IF-THEN statement?

  • Trying to get the sidebar not to show up on a page titled, “Workshops”.
    Here’s the code I’m using:

    <?php if ( the_title() !="Workshops") {get_sidebar();} ?>

    No clue why it’s not working. It displays the word “Workshop” AND the sidebar.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Use get_the_title() in place of the_title().

    Thank you!!

    Is there a list of all the functions somewhere?

    These are my top “Helping myself” resources when I’m working with WordPress:

    The Loop – The Loop out puts all of your posts data to the page so understanding this is key!

    Template Tags – WordPress’ Template Functions (use within “The Loop” !)

    Function Reference – A guide to WordPress’ built in PHP Functions.

    Writing a Plugin – Help creating your own Plugins for WordPress.

    Widgets API – For help when creating your own widgets, or adapting a plugin into a widget.

    As you’ll see the codex here is pretty comprehensive and with a reasonable knowledge of (X)HTML and PHP (plus CSS for styling of course) there’s everything you need to get you started with customising and developing your own templates, functions and plugins etc. for WordPress.


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can you see the flaw in my IF-THEN statement?’ is closed to new replies.