• 0
Sign in to follow this  
Followers 0

Adding WordPress Post Tab Plugin function to Customize plugin

Question

Posted · Report post

I need to add the following php function for WordPress Post Tab plugin

<?php do_shortcode("[mytab name='TEST TAB 1']Tab1 content[/mytab]");
	do_shortcode("[mytab name='TEST TAB 2']Tab2 content[/mytab];");
	echo do_shortcode("[end_mytabset]");?>
in order to utilize the plugin so I can use this feature. According to my research on the forum, using the Customization plugin, in the function.php I should be adding something like this,
add_action('pagelines_loop_before_post_content','myCode');
	function myCode(){
	
	<?php do_shortcode("[tab name='TEST TAB 1']Tab1 content[/tab]");
	do_shortcode("[tab name='TEST TAB 2']Tab2 content[/tab];");
	echo do_shortcode("[etab]");?>

But it is not working so I am missing something here. Please note that I am trying to use this as part of the post content but unable to find the relevant function. Any help would be appreciated. }

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

I think you need to end PHP first, then re-open it after you've injected your PHP as shown below. You also need a div so that you can actually apply styling, if necessary, also as shown below. [code]add_action('pagelines_loop_before_post_content','myCode'); function myCode(){ ?>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Forget it, UI plugin works the best without any customization. No need to insert codes, etc... Thanks for taking the time to read it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0