This cannot work.
It has to look like the following (or similar):
<?php
if (get_post_meta($post->ID, 'TourURL', true)) {
?>
<div class="tourenquiryonline">
<h2>Book or Inquire</h2>
This tour can be booked online.
</div>
<?php
} elseif (get_post_meta($post->ID, 'bhid', true)) {
?>
<div class="tourenquiryonline">
<h2>Book</h2>
This tour can be booked online via the form on the right hand side of this page.
</div>
<?php
} else {
?>
<div class="tourenquiry">
<div id="wufoo-q7x2x3">
Fill out my <a href="http://touristisrael.wufoo.com/forms/q7x2x3">online form</a>.
</div>
<?php
}
?>
// Edit
And as you can see, you are missing a closing </div>
in the else
case.
Related Posts:
- Two queries for a WP_User_Query search work perfectly apart, but not together
- Query pulling a single post per month
- Include a custom field in mysql query
- How to update custom fields using the wp_insert_post() function?
- Adding custom input for data attribute in insert media modal
- The correct method to pass query vars in AJAX using ajaxurl
- Alter query on edit.php
- Custom Meta Field – Youtube embed
- How to find objects by terms
- How to create a WP_Query to search the Title or Tag?
- Print html when custom field has value inside while loop
- Update WordPress Custom Field with AJAX on cached page
- How to get user by display_name with WP_User_Query
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- my function doesn’t return my post from today
- how to increase custom post value by one most efficiently?
- How to get to a specific position in wp_query?
- Multiple choice in a custom taxonomy
- Get all user meta by meta key instead of ID
- Sum custom field values of particular taxonomy
- Importing hard coded custom field into acf field
- Get stock by custom meta field on all Woocommerce variable products
- Passing the custom field values in the wp_get_current_user array function
- mysql query from wordpress page using custom table
- Firing schema via code in functions.php doesn’t work
- How can I add extra word in permalink when someone click download button?
- Seach custom post type posts only by meta fields?
- How to pre populate a form field with a link of a current user’s author profile?
- Trying to get a PHP variable defined in a custom post into a javascript file. Null value. Using wp_localize_script
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- conditional logic for front-end custom field edits
- register_taxonomy() take much queries
- Custom field values to taxonomy terms
- Which PHP page is the Default Posts Page
- Non-Closing PHP Query in WordPress Loop
- How to check if a PHP string is different than meta field?
- Display custom field on 404 page outside loop
- How to show/hide php table rows based on the content of custom fields
- working with term_relationships table
- how to get serialized post meta
- How to show meta value code HTML after x paragraph
- Issue with custom loop in Archive page
- Creating an image from a custom field
- Shortcode to pull posts
- Problem with adding custom CSS class to image in ACF Photo Gallery plugin [closed]
- Output custom text field as unordered list
- Conditional featured image with youtube thumbnail
- Order a WP_Query by meta value where the value is an array
- How to get thumbnail with pure PHP in a WordPress database?
- Unable to render custom field after attempt to generate a list of recent post in page template
- Add a custom class to the body tag using custom fields
- Undefined variable: row?
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- WordPress stripping out custom field tags
- Display additional user fields
- WordPress is removing query variables like page, p from the URL of a custom static page
- WordPress Conditional / Multiple Taxonomy Query
- How can I modify this code to make the search box include tags and meta
- Updating Metadata with Shortcode
- Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
- Trying to update Woocommerce meta values
- Is it possible to update the dataset using update_post_meta
- Setting up a cron job to auto update a custom field
- How to Call on WordPress Custom Fields without a Plugin
- Query on a repeater date (acf)
- Save custom field on WP_List_Table
- How can i limit the number of posts to the most recent 6 in my query?
- Trying to retrieve meta values from three different meta keys and display in rows
- WP post meta – for loop inside for loop
- custom fields anchor points php
- Store custom field’s multiple values in one user meta key
- Get field in readable word
- WooCommerce multiple custom fields code
- wordpress query returning unexpected results
- Let user select the number of posts shown per page jquery error
- Updating Lat and Lng of posts automatically gives sporadic results
- WP_query meta_query slow with OR and DATES
- meta field for numerous links
- How can I display a query in a page?
- Get posts associated with media attachment
- divide custom field values in div every two values
- Showing custom field contents without listing description
- How to exclude post from being queried based on custom meta value
- Check if values exists DB
- Trying to exclude posts from a category on the home page
- I want Page titles and excerpts to show up on home.php in certain order
- Posts sortable column not sorting properly for custom field numbers
- The search engine of my website finds only posts and not pages, how can I solve this problem?
- Hide empty categories from get_categories
- Search result page – display values from the result’s metaboxes
- Query Concatenation
- ACF Date fileds to Age Convert [closed]
- Save custom field value to variable for conditional – why is this not working? [closed]
- Displaying custom meta box value in a custom post page
- Sorting a custom post type in pre_get_posts
- Convert custom field date format to “WordPress default”
- How do you create a front end form that enables the editing of member-specific custom fields in WordPress?
- Search custom post type posts only by meta fields?
- How to pass value to add_filter wpcf7_form_tag from another function?
- SQL query to retrieve the number of WordPress posts with all given categories