Site logo

Archived topic

Custom Sidebar without PHP?

5 replies · Started by Matt Stern on January 18, 2022

Viewing posts 1–6 of 6

Hi Guys,

For security concerns, my client has requested the DISALLOW_FILE_EDIT to restrict php.

We're using the Merch starter site, and one hook from that was the use of a right sidebar on Woo product pages. This displayed the sidebar to the right of the product description. Screenshot: https://nimb.ws/sv5jhF

The code for that is <?php get_sidebar( 'right-sidebar'); ?> and the hook is woocommerce_after_single_product_summary

B/c of the php restriction, this will not load on the front end.

So I'm wondering, is it possible to create this using a block element? I created a block element with the style and content for the sidebar, then tried to place it on the woo product page using hooks, but am not able to get it to display properly. See: https://honestairpurifiers.com/airpura-r600-air-purifier

Any thoughts? Thank you!

Got it, thx. Can you clarify. does this security measure only prevent people who already have access to the dashboard from executing php? Or does it also provide some sort of protection from outside attacks?

Perhaps if we enabled two-factor authentication, we could allow the php without the risk?

Thanks for the help.

Perfect, thanks David.

You're welcome

This archived topic is closed to new replies.