PHP code with custom post meta
-
Hello. First of all, thank you for this great plugin. ??
My problem is that I’m beginner in php. I have no clue how to implement custom post meta value inside the php single qoutes.
This is the custom post meta (gallery is ID of Soliloquy):
<?php get_post_meta($post->ID, 'gallery') ?>
And this is the original php code:
<?php if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '248' ); ?>
I created this, but it is not working because single quotes.
<?php $soliloquy = get_post_meta($post->ID, 'gallery') ?> <?php if ( function_exists( 'soliloquy_slider' ) ) soliloquy_slider( '$soliloquy' ); ?>
Could you help me to get working code? ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP code with custom post meta’ is closed to new replies.