Metasliders using Custom Fields
-
I’ve tried getting a metaslider to display on just my home page using custom fields called from my functions.php file and it’s just creating a big blank spot below the header (the div tags for the metaslider don’t show up in the code). This functions was actually used for a slidedeck-I just tweaked the code for metaslider(not using slidedeck for this project). The problem seems to have something to do with the variable declared in the function. When I comment out $metaslider_id the div tags show up in the code. What am I overlooking?
Here’s the code:
function slidedeck_insert() { $metaslider_id = getCustomFieldValue('metaslider_id', ''); if( !empty($slidedeck_id) ) { ?> <div id="slidedeck_wrapper"><div id="slidedeck"> <?php echo do_shortcode( "[metaslider id=" . $metaslider_id . "]" ); ?> </div></div> <?php } } add_action('thematic_belowheader','slidedeck_insert');
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Metasliders using Custom Fields’ is closed to new replies.