Replace line #3 with this if ( is_single() && isset( $post->post_author ) && 'post' == get_post_type() )
Related Posts:
- get post author id outside loop
- Make Custom Metaboxes Collapse by Default
- Check for and enforce unique value in user-entered custom meta field in WP Admin
- how to flush custom author rewrite rule
- Add ‘Right Now’ widget to custom dashboard
- Paginate Author’s Post List on Custom Author Page (ANOTHER THEORY)
- The Best Way to always load the newest version of 3rd party code
- I’m using add_meta_box() but want to include TinyMCE editor *and* Media Uploads for each box
- How to encode author ID in the author permalink
- custom meta box for page default template
- Data won’t save if metabox within conditional in admin. What am I missing?
- Let author add field to metabox by pressing a button
- Meta Tags by Meta Box
- Showing Meta Box via Jquery Checkbox
- Inline-Table under TwentyTwelve not working
- problem saving/ retrieving custom meta with wp alchemy metabox
- WordPress 3.1.2 Bug: add_theme_support() and video post format registering twice
- Different profile page by role
- Select input in metabox not updated
- Multiple header style under meta box
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- Change meta-box title- “LearnDash Quiz Settings” to “Quiz Settings”
- Embedded Options in a Custom Metabox
- duplicate featured image functionality in custom meta box
- issue with saving custom metaboxes fields
- after checked the checkbox in backend, dont show social link on frontend
- Change post template the proper way
- Redirect Every Instance of The Author Template Pages to Custom Author Pages
- Get a different size of Image thumbnail while working with custom metabox
- Need Advice to Working with Custom Post Meta
- Is there a blank theme framework compatible with WP 3.0? [closed]
- Plugin SVN & update API – how are plugins identified?
- How to use more than 256MB of memory in the admin?
- Custom Search Query
- Removing fields from the Media Uploader/Gallery
- Managing Images for a WordPress Blog: Picasa or Flickr?
- When using the block.getSaveElement hook can you output different markup based on whether or not you are in the edit view or the live page view?
- Selecting An image from the Media LIbrary on the frontend
- How wp_ajax_nopriv since WordPress 3.1
- Set user loggin status?
- redirect product-category to a custom page
- custom headers for static home page and posts page
- How to redirect WooCommerce shop URL?
- Best way to implement a thumbnail-based gallery in WordPress?
- Why is my mod_rewrite not working?
- Show posts on a page based on a category and tag(s)
- Any tools for quickly grabbing comments / comment count?
- Custom WP_Query with no posts to output
- Adding Page Attributes and Page Templates to Custom Post Type WP 4.7.3
- WordPress Locale Switching on Accept-Language Header
- syntax highlighting for theme-editor.php?
- adding homework to a school’s website
- How do I call in a category title on a category page in a child theme?
- Include custom JS without child theme
- Prepopulating a specific page template with HTML/CSS
- How to get every custom taxonomy names and urls?
- Is there a way to by-pass the pagination function on one custom template?
- Create page as a file in my theme?
- Changes in my child theme from customizer not appearing in style.css?
- How can I hide custom field from users used for caching response from external api?
- Search URL parameters query [duplicate]
- Change Successful password reset message
- Changing the the_author_posts_link() hover title
- How I can directly add drop-down in my product on shop page as show in below image
- How do I hide an article element so only logged out users see it
- How to add custom ‘layout’ buttons to wordpress editor?
- How to request container_class from wp_nav_menu
- Replace a ‘Title’ tag with a Custom Field
- change top banner content on specific page
- Is “get_template_part” hierarchy possible?
- Is it possible to integrate a custom login feature with wordpress?
- Custom Register Link on Backend Form
- Make separate text boxes for separate WordPress Custom Fields
- Prevent WordPress from automatically installing a new theme each year
- Dynamic Sections
- How do I run a web app in my WordPress theme without the “wp-content/theme/…/webapp” in URL?
- How to make conditional statement in WpBakery (formarly Visual Composer)
- Widget recent comment filter by post meta_value
- Highly stylized pages
- Replace featured image when shortcode is present
- Disable post-new.php (default Post type)?
- How to serve an already coded html page in a WP page, to assign a simpler url
- Check get_post value after wp-admin login
- My connecting URL form in html to PHP does not work
- generate a static copy of the website footer html
- Multi-site customization
- Show different pages on site depending on user choice
- Is there a way to limit multi upload in media upload box?
- Use another theme template in my theme
- How to loop through 1 CPT with 2 Taxonomies
- Pulling posts into static site (wordpress as subdirectory)
- Call a duplicate registration form with other url
- How to support extra color options for shortcodes?
- WP Customizer – what types of fields is it capable of supporting?
- pull custom fields values from wp-database in a nested foreach loop
- Remove “minor-publishing” div from Publish admin metabox
- Pass query param to custom page
- responsive screen not working [closed]
- how do i add logo in my site
- Show total sales for each products on search results page Woocommerce