Change color of a specific word generated by script [closed]

Insted of <font style=”font-color:#2ED7A2;”>’ + crypt_single_target_currency.match(/.*?\(([0-9a-z]+)\)/i)[1] + ‘</font> try <span style=”color:#2ED7A2;”>’ + crypt_single_target_currency.match(/.*?\(([0-9a-z]+)\)/i)[1] + ‘</span> the font tag isn’t supported in html 5 and you were calling “font-color” instead of just “color”

Get current day using javascript [closed]

I’ve an approach for you, getting the WordPress date in JavaScript, a numb one, but still an approach: 🙂 functions.php wp_enqueue_script( ‘wpse-custom-scripts’, get_template_directory_uri() .’/js/wpse-custom.js’, array(‘jquery’), ‘1.0.0’, true ); wp_localize_script( ‘wpse-custom-scripts’, ‘wpse’, array( ‘date_time_now’ => date( ‘Y-m-d H:i:s’, current_time( ‘timestamp’ ) ), //format: YYYY-MM-DD 00:00:00 ) ); wpse-custom.js jQuery(document).ready(function($) { console.log(“WordPress date now: ” + wpse.date_time_now); … Read more

Broken links help with site

You could use your text editor on your theme and plugin files to search for the /js/respond.src.js in the source code. If in a theme, then create a Child Theme and modify that php file. (Any changes you make to a theme’s code will be overwritten in the next theme update.) If it is a … Read more

Orbit Slider and Events Manager Plug-in JavaScript

If you want to enqueue the scripts only on the “Events” page, change the following code to include the conditional tag is_page() function public_enqueue() { //Scripts wp_enqueue_script(‘events-manager’, plugins_url(‘includes/js/events-manager.js’,__FILE__), array(‘jquery’, ‘jquery-ui-core’,’jquery-ui-widget’,’jquery-ui-position’,’jquery-ui-sortable’,’jquery-ui-datepicker’,’jquery-ui-autocomplete’,’jquery-ui-dialog’)); //jQuery will load as dependency //Styles wp_enqueue_style(‘events-manager’, plugins_url(‘includes/css/events_manager.css’,__FILE__)); //main css } Change it to the following: function public_enqueue() { if( is_page(‘events’) ) { //Only load … Read more

Unable to change the location of a file

One problem could be that you’re missing “ ***<img class=”srcimage” src=server-side4.php/>*** Change it to ***<img class=”srcimage” src=”http://example.com/your-path/server-side4.php” />*** Then if that doesn’t fix it, try outputting your variables to see what you’re working with. Make sure that all these values are giving you the results you’re expecting. console.log(base); console.log(jQuery(“#realtime-form”).serialize()); console.log(jQuery(“.preview img”)); If you don’t want … Read more

Adding react app to an existing wordpress website

You need to include scripts and styles properly as it has been done here https://github.com/radekzz/wordpress-react-in-theme add_action( ‘wp_enqueue_scripts’, ‘enqueue_my_react_app’ ); function enqueue_my_react_app(){ foreach( glob( get_template_directory(). ‘/myReactApp/build/static/js/*.js’ ) as $file ) { // $file contains the name and extension of the file $filename = substr($file, strrpos($file, “https://wordpress.stackexchange.com/”) + 1); wp_enqueue_script( $filename, get_template_directory_uri().’/myReactApp/build/static/js/’.$filename); } foreach( glob( get_template_directory(). ‘/myReactApp/build/static/css/*.css’ … Read more