Use a Shortcode In the ABOVE MASTHEAD SLIDER or BELOW MASTHEAD SLIDER position

Hey Guys

I am building a site and I would like to continue to use X as the theme on the site.

One of the absolute priorities of this site is to have a FLIPBOOK presentation as the primary focal point of a post.

We currently use a theme ( that we would prefer not to use ) but has the ability to post a SHORTCODE that creates the FLIPBOOK.

Is it possible, and HOW WOULD I DO IT to use a SHORTCODE in the position where an ABOVE MASTHEAD SLIDER or BELOW MASTHEAD SLIDER would normally be?

Thank you in advance for your assistance with this.

Christopher

Hello Christopher,

Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

After the child theme is set up, please add the following code in your child theme’s functions.php file

add_flipbook_shortcode(){
  echo do_shortcode( '[flipbook shortcode here]' );
}
add_action('x_after_view_global__slider-below', 'add_flipbook_shortcode');

and if you want to display the flipbook shortcode above the masthead, simply replace x_after_view_global__slider-below with this x_after_view_global__slider-above.

Hope this helps. Please let us know how it goes.

OK

First, thank you for the incredible answer. We are using a child theme.

This makes sense until I get to the “and if you want to display…”

Our goal is to be able to show a SPECIFIC FLIPBOOK on the top of EACH POST. Each post will have a different FLIPBOOK SHORTCODE.

Sorry if I wasn’t more clear.

Each specific flipbook - we have MANY ( an entire post category ) has it’s own specific shortcode.

Post 1 would have a shortcode that we would need to add to the post.
Post 2 would have a shortcode that we would need to add to the post.
Post 3 would have a shortcode that we would need to add to the post.

Does this make sense?

How can I make that happen?

Thank you in advance for the assistance.

Christopher

Hi Christopher,

Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. You can seek help from a developer to help you on this.

Basically, what you need to do is to add a metadata (a new field) to your posts where you put the FLIPBOOK shortcode. Then a PHP code that will output that metadata on the front.

If you’re not comfortable doing this, you can find an X developer on the X FB Group, if that interest you.

Thank you for understanding,
Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.