• Resolved m0n0mind

    (@m0n0mind)


    Hey,

    I wonder how to create a condition based on a postmeta value that is saved in the db as a serialized array.
    I’d like to check for a custom postmeta that is created by the theme (to hide the page title actually) but when using it for a custom condition and enabling debug mode, it says something like this:

    
    DynamicTag-Tag:
    post-custom-field
    DynamicTag-Key:
    DynamicTag-Value:
    <br /> <b>Warning</b>: preg_match() expects parameter 2 to be string, array given in <b>/home/www/stage/wp-includes/class-wp-block-parser.php</b> on line <b>417</b><br /> <br /> <b>Warning</b>: strlen() expects parameter 1 to be string, array given in <b>/home/www/stage/wp-includes/class-wp-block-parser.php</b> on line <b>489</b><br />
    Check-Value:
    remove-title
    Check-Value2:
    Condition-Type:
    default
    Condition:
    Hide if contains
    Condition met:
    no
    

    I suppose this serialized postmeta is returned as array then but matching is done as if it would be a string.

    anyway, is it currently possible with this plugin?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author rtowebsites

    (@rtowebsites)

    Hello @m0n0mind,

    did you select a “Custom Key”? You need to click on the “Post Custom Field Dynamic Tag” and enter a Custom Key. I do not think you can get arrays there. Maybe you will need an extra dynamic tag for that.

    This plugin just uses the result from Dynamic Tags. We hope you will find a solution for your problem.

    If you can provide us some more informations like the theme or how it works (how the postmeta in the db looks like), we maybe can help you further.

    Thread Starter m0n0mind

    (@m0n0mind)

    Hey & thanks for your quick response!

    Well yes, I chose a post custom field as a dynamic tag: “wpbf_options”. There, the post custom fields are pre-selectable (using the page builder framework theme) but I also tried to enter it manually and checked if it’s available in the postmeta table for this specific post.
    please see attached images…thanks!
    https://ibb.co/tJ0qM6G
    https://ibb.co/PGC42kr

    Plugin Author rtowebsites

    (@rtowebsites)

    Hello @m0n0mind,

    ok, it seems like the Dynamic Tag can not handle with arrays. You need a own Dynamic Tag for that.

    We are sorry, but we do just uses the Dynamic Tags, you should create an Issue at Elementor for that.

    Thank you.

    we close this issue, since it is out of our scope.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Support custom fields (serialized arrays)’ is closed to new replies.