You can do that via echo
, just place it on a new line inside the if conditionals braces {
and }
e.g.
if(this statement is true)
{ // <- do everything between here
/*
stuff that happens if the statement is true
*/
} // <-- and here
else
{
// stuff that happens if the statement is not true
}
So you could do this:
if( is_page( 39 ) ) {
echo do_shortcode('[nggallery id=1]');
// add more stuff here, e.g. echo "<p>Bio info etc</p>";
echo "<p>Bio</p>";
}
Related Posts:
- Conditional Statement – check if post has an attachment image
- Trying to use Ternary operators with WP Conditionals
- How to do conditional publishing?
- conditional statement for custom taxonomy
- Add user settings to specific roles
- How to display conditional-content if wp_nav_menu( $args ) retruns something
- Create a new usermeta field for users
- Redirect to a different page through registration, depending on page
- How to Arrange PHP Files to Allow for Multiple Types of Pages?
- What is the correct way to write this conditional statement?
- Reordering Buddy Press profile navigation [closed]
- Is_front_page inside header.php is always returning true
- Advanced Custom Fields – display label and value only if value entered
- PHP conditional script issue
- How to check if the current page is at a specified path in the URL?
- Add class to DIV depending on page loaded
- Can I set up a hover animation in CSS depending on a PHP conditional?
- Multidimensional Array
- Conditional featured image with youtube thumbnail
- How to make a conditional statement within $output in shortcodes.php?
- Conditionally remove comments and post meta in functions.php
- exclude custom post type from running a function
- Show label for value only when value exists, basic php
- Conditional formatting on data fetched from MYSQL
- Find and print first entry from WordPress post in custom excerpt?
- Adding if statement
- Change Login or Logout text based on status
- Jetpack: Display Site Title when no Site Logo
- If else statement based on referral URL
- If Month=Particular month display content [closed]
- Php conditional help needed
- Custom Meta Box If Else Statement
- Hide a nav menu item based on get_user_meta results
- How do I reformat this to add php inside php?
- Not able to see the error [closed]
- How do I make an HTML table from a database table?
- dbDelta support for FOREIGN KEY
- How can I save a multiple select array with the settings API for a plug-in options page?
- Inject post (from specific category) between posts in Loop
- Initialize WordPress environment to use in a real cron script
- “wp_enqueue_style();” don’t load new edited style
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 64 bytes)?
- How to Add a Link to the Drop-Down User Menu in the Admin Bar?
- Remove username in emails or swap username for email
- List of posts by day of the week
- How to add custom taxonomy slug in CPT permalink?
- What SQL / WordPress queries would need a nonce?
- Creating bulk posts with Youtube videos
- How to test nonce with AJAX – Plugin development
- How to do multiple searches (with logical OR) in WP_Query in hook pre_get_posts?
- add_image_size for header_image
- Return a numerical function value in Customizer controls
- Enable custom logo upload if logo is not in header
- theme_root returning a truncated URI
- Echo string and function?
- Only first shortcode gets executed
- What is the latest WordPress that will work on PHP 5.2.17?
- Get all categories post is not in
- Function returns post URLs rather than retrieving Facebook Graph API data
- Error while setting role
- Editing a PHP file to include a small text piece on every page
- trying to put an active hover to my custom nav category buttons [closed]
- Can’t successfully check if post with title exist in database
- Handling repeater data
- Adding Updated Post Date PHP Custom Theme
- Create a a form for custom taxonomy terms
- How to make blog post entries appear as input form instead of just text?
- What is the difference between Null vs Empty (Zero Length) string?
- Password protect URLs
- Add Block Before Entry Title Using PHP
- How to correctly escape an echo
- Dynamically populate parameter in Gravity Forms using PHP
- Build A Custom SQL Query for WordPress Search
- How to get specific multiple pages excerpts at homepage?
- Trying to get post ID outside loop on blog page
- Learndash: Customize user enroll time
- How to edit post meta data before publishing the post it self wordpress?
- Including user data in “new user notification email”
- get Woocommerce product format json for WP_Query
- Get list of posts from attachment
- Refresh page after login with litespeed cache
- remove_action() not working in page template – Genesis
- Adding action item to admin users table and sending email
- Using get_the_excerpt in edit-post
- ajax form with multiple submit buttons and values
- Unserializeing multiple column values that are stored in one database results variable
- WordPress – custom navigation item classes
- Keeps asking Connection Information upon update to 3.5.1 (but not for plugins?)
- How can I add more code to this?
- Display custom meta box in my template file
- wp_enqueue_style conflict when using in different action hooks
- WordPress developer
- If the_content’s string length is greater than 0, show post otherwise dont
- wp_enqueue_scripts with JS script as a string
- Why can’t I enter the wordpress admin interface?
- base64_encode conflict with convert_smilies in wordpress
- HTTP 500 Error after Creating Shortcode
- Show button in header when product custom field is not empty
- Why a class property becomes empty?
- how to goto specific page number including title with permalink