• Resolved Christopher

    (@cweddell)


    I am using multiple block_value()s to run a query using get_posts which shows the expected results in the front end, but in the editor no results are shown and all I get is ‘Loading preview…’

    I anyone can help with where I am going wrong would be much appreciated – I am finding Gutenberg a steep learning curve, though Block Lab is great an almost brought it within reach of my limited and novice coding.

    Many thanks,
    Christopher

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Christopher

    (@cweddell)

    I have dug further and found the following…

    $category = block_value('category');
    echo block_value('category');
    echo $category;

    In the editor it returns:
    140
    [“category”]

    In the front end it returns:
    140
    140

    It appears to be the same for any declared variables, in the editor it is returning the Field Name and not the value (but in the front end it is happily returning the correct value.

    #confused

    Plugin Author Luke Carbis

    (@lukecarbis)

    Hi Christopher! Yes, this is a known issue, introduced with the latest Gutenberg update. We’ll have a fix out early in the week.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query with with block_value() unexpected results’ is closed to new replies.