• hello

    i try to add this code to a block

    <audio id="player" controls>
        <source src="asmaa {{podcast-url}}" type="audio/mp3" />
    </audio>
    <script>
        const player = new Plyr('#player');
    </script>

    to show a podcast player, on back end it work fine no issue but on front end on source code i nothing show on src=”” , i try create another block also for video player still not show ,,,

    when i try add the variable on template file it work

    <p><?php echo get_lzb_meta( 'podcast-url' ); ?></p>

    it show the full mp3 url ,

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author nK

    (@nko)

    Hi.

    Works fine for me. Maybe you forget to sync changes in Frontend and Editor code editors?

    Thread Starter sadiq7ahmed

    (@sadiq7ahmed)

    hello

    i do try but nothing work

    View post on imgur.com

    look at the screenshots

    Plugin Author nK

    (@nko)

    Ah, I didn’t realize, that you save the value in post meta.

    Meta fields should be used in PHP only. Gutenberg doesn’t save it in block data, so it is not available on the frontend.

    Thread Starter sadiq7ahmed

    (@sadiq7ahmed)

    but i was testing it before on test wp localy it was work fine i can you both ! so you say when i delete the post meta i can use it on “Gutenberg ” ?

    Plugin Author nK

    (@nko)

    Not sure if it ever worked.

    You can use it in Gutenberg block if this control will not use the option “Save in Meta”.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘value not show on html’ is closed to new replies.