Make a script work within a page

I think both external CSS & JavaScript files should be added to your active theme functions.php file into function which implements action wp_enqueue_scripts. It should looks like example code below: <?php // … function themename_enqueue_scripts() { // … wp_enqueue_style(‘themename-slider-style’, ‘//scd01.bcnshop.com/ca/widgets/generate-css/1815/4150.css’, false ); wp_enqueue_script(‘themename-slider-js’, ‘//scd01.bcnshop.com/ca/widgets/generate-js/1815/4150.js’, array(‘jquery’) ); // … } add_action( ‘wp_enqueue_scripts’, ‘themename_enqueue_scripts’ );

Remove &nbsp from the_excerpt

I’m not sure why there’s a non-breaking space being added to the front of your excerpt. It would be best to find out what is putting that there. But in the meantime, you can add this to your theme functions.php ( or a simple plugin ) and it should take care of it. //* Remove … Read more

product description text displays above website when in shop page [closed]

Your product descriptions contain html code which is inserted into description meta tags without proper escaping. The resulting meta tags look like this: <meta property=”og:description” content=”<p class=”p1″>100% Natural Anti-Ageing Face Cream with Marine Collagen, Elastin &amp; Essential Proteins – Anti-Wrinkle Cream to Repair, Restore, Rebuild &amp; Rejuvenate Skin</p>” /> The problematic part is <p class=”p1″> … Read more

Calling function in loop causes repeat data

first of all, you could delete the return $ranking += 1; and replace by $ranking += 1;. We don’t know what happend in the template-parts/content, but don’t forget to add a little <?php wp_reset_postdata(); ?> just after your endwhile;.

Earlier stylesheet not overriding later one

I looked at my child theme’s functions.php and I found that I had commented out the line to enqueue the child style.css. I’m guessing that the stylesheet is loaded automatically because that is the active theme. I would suggest you try not explicitly loading your child theme’s stylesheet and see if that helps. P.S. Only … Read more

How to use the checked() function to check for a non-empty var

Not possible. You may do both, but may not be as optimal as single line: $verify = (empty($var)) ? ‘current_value’ : $var; checked( $verify, $current ); Or you can create a custom function: function better_checked($check, $current, $echo = true) { $result=” checked=”checked””; if ( ( $check != ” && $current != ” ) && ( … Read more

wordpress site – using custom database and PHP

Since we do not know how the data should be represented on the ‘front-end’ (read WP install), it is hard to say. You could convert the existing database to use custom tables. Create a small REST(1) JSON/XML(1) API(1) on the ‘other’ application. Then code a WordPress plugin that shows the data from the API with … Read more