Admin Columns
[resolved] Suggestion - Custom fields to have PHP to display value (3 posts)

  1. Geet Jacobs
    Posted 4 years ago #

    I am not sure if others have need for this, but I make many custom fields for custom post types. Some of these fields are true / false others are custom array's.

    I would love to have a checkbox on a custom field column option which would say something like "Custom display" which would show a text area where you could enter your own PHP to display the meta value in a custom way.


    if( 'meta_value' == 1 ) {
    echo 'Yes';
    echo 'No';

    if( 'meta_value' == '' ) {
    echo 'No Data';
    echo 'meta_value';

    Who knows its a worthy feature to add, but thought I might suggest it.

    Thanks for the great plugin!


  2. Codepress
    Plugin Author

    Posted 4 years ago #

    Thank you for your suggested feature.

    In the next release ( probably v1.4.5 ) I will be adding some extra filters which would you accomplish the same thing. Only the code needs to go in your themes functions.php.

    I will give an example when it is released.

    - Tobias

  3. Codepress
    Plugin Author

    Posted 3 years ago #

    You can now do this by using the filter 'cpac_get_column_value_custom_field'.

    Check out the FAQ section for an example.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Admin Columns
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic