Skip to main content
added 4 characters in body
Source Link
Milo
  • 78.9k
  • 4
  • 127
  • 168

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes:

[vr_jsp]
[/vr_jsp]

I have two different custom fields that I need to put between their own set of the above shortcodes which are:

<?php the_field('first_content_block'); ?>
<?php the_field('second_content_block'); ?>

I understand you can use the below code to do this but I am a bit stuck on what to use to output the custom field between the two shortcodes.

 
<?php echo do_shortcode('[vr_jsp]CONTENT HERE[/vr_jsp]'); ?>

Just to clarify I need the custom field (first_content_block) displayed where 'CONTENT HERE' is.

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes:

[vr_jsp]
[/vr_jsp]

I have two different custom fields that I need to put between their own set of the above shortcodes which are:

<?php the_field('first_content_block'); ?>
<?php the_field('second_content_block'); ?>

I understand you can use the below code to do this but I am a bit stuck on what to use to output the custom field between the two shortcodes.

 

Just to clarify I need the custom field (first_content_block) displayed where 'CONTENT HERE' is.

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes:

[vr_jsp]
[/vr_jsp]

I have two different custom fields that I need to put between their own set of the above shortcodes which are:

<?php the_field('first_content_block'); ?>
<?php the_field('second_content_block'); ?>

I understand you can use the below code to do this but I am a bit stuck on what to use to output the custom field between the two shortcodes.

<?php echo do_shortcode('[vr_jsp]CONTENT HERE[/vr_jsp]'); ?>

Just to clarify I need the custom field (first_content_block) displayed where 'CONTENT HERE' is.

Source Link
BHWD
  • 32
  • 3

do_shortcode close

I am using the jscrollpane plugin on WordPress along with the advanced custom fields plugin. The jscrollpane plugin uses the following shortcodes:

[vr_jsp]
[/vr_jsp]

I have two different custom fields that I need to put between their own set of the above shortcodes which are:

<?php the_field('first_content_block'); ?>
<?php the_field('second_content_block'); ?>

I understand you can use the below code to do this but I am a bit stuck on what to use to output the custom field between the two shortcodes.

Just to clarify I need the custom field (first_content_block) displayed where 'CONTENT HERE' is.