How to give path to files in plugins folder?

I’d create a function and then use the wp_enqueue_scripts action to add your script to the list; function load_more_scripts() { wp_enqueue_script( ‘tsw-tools-js’, // unique handle name ‘/wp-content/plugins/dl-grid-addons/includes/wp-bakery/tsw/tsw-tools/assets/js/tsw-tools.js’ // path relative to WordPress root directory ); } add_action(‘wp_enqueue_scripts’, ‘load_more_scripts’); More information can be found here: https://developer.wordpress.org/reference/functions/wp_enqueue_script/

WP-DBManager Plugin Can’t Find Mysql Path

I solved this with help from the main StackOverflow site. One of the commenters suggested that the open_basedir directive might be set in php.ini – and that was the issue. Here is the open_basedir setting: open_basedir = “/var/www/vhosts/lifering.org/:/tmp/” I created a hard link mysql (could have been a symlink) to /usr/bin/mysql in the /tmp directory …

Read more

Back button to previous page and breadcrumbs

For the button behavior, If it’s a one-off use case, you could add custom php conditional to check the referring url $_SERVER[‘HTTP_REFERER’] and current page/post ID or url. Then, either add a class to the button’s containing div wrapper in the template for hiding via css or directly output/include the button html in the template …

Read more

Img src path from wp-admin

Best to use a images folder in your child theme and output like this: $output = sprintf( ‘<img class=”your-class” src=”https://wordpress.stackexchange.com/questions/259497/%s” alt=”https://wordpress.stackexchange.com/questions/259497/%s” />’, get_stylesheet_directory_uri() .’/images/image.jpg’, get_the_title( $post->ID ) ); echo $output;

Images in sub-pages fail to load

Your problem has nothing to do with htaccess. It’s that you’re using relative paths where you should be using absolute paths. (Here’s an explanation of the difference) Probably the best way to reference any assets in your theme (assuming your theme has an “images” subdirectory) is to do something like: <?php echo get_bloginfo(‘template_url’) ?>/images/your_image.jpg The …

Read more