WordPress.org

Ready to get started?Download WordPress

Forums

Can you see the flaw in my IF-THEN statement? (4 posts)

  1. rankbooster
    Member
    Posted 3 years ago #

    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.

    Ideas?

  2. MichaelH
    Member
    Posted 3 years ago #

    Use get_the_title() in place of the_title().

  3. rankbooster
    Member
    Posted 3 years ago #

    Thank you!!

    Is there a list of all the functions somewhere?

  4. gr1zzly
    Member
    Posted 3 years ago #

    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.

    hth

Topic Closed

This topic has been closed to new replies.

About this Topic