How To Display Custom Field In (2 posts)

  1. tmac187
    Posted 3 years ago #

    I'm using the Types Plugin and created a custom field. I'm trying to display this custom field in the sidebar of all of my pages. The problem is that it only displays in the sidebar of the page I created the custom field on. It does NOT display in the sidebar on any of the other pages. Here's the code I placed in my sidebar.php file:

    <?php echo(types_render_field("photo", array("alt"=>"Product image",
      "width"=>"300","height"=>"200","proportional"=>"true"))); ?>

    Any ideas on how to get it to display in the sidebar of ALL the pages? I'm using the Twenty eleven theme with the latest version of WordPress.



  2. AmirHelzer
    Plugin Author

    Posted 3 years ago #

    This is more a theme question then a question about Types.

    The code you pasted will render the custom field. If it displays on a specific page or on the entire site depends on your theme and what it does with the sidebars.

    To experiment with this, try the default theme.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic