Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Search results

  1. W

    JavaScript Help make a clickable DIV block

    Hi, I have this theme where an image, and some text are two separate blocks that share the same link so they currently operate separately and I wanted to get it where I could just click the main block and have it act as one link. I was trying out the following type of solution but it doesn’t...
  2. W

    PHP PHP 8 Fatal Error

    Hi, I am getting a fatal error of PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in... on the following count line when upgrading from PHP 7.4 to PHP 8: function orderByDate($items) { //$tempDate = strtotime($item)...
  3. W

    PHP A non-numeric value encountered Warning

    Hi, I am getting a non-numeric value encountered warning on the line with the + in PHP 7.4. If I change the following from // Color picker case "color": $default_color = ''; if ( isset($value['std']) ) { if (...
  4. W

    PHP Undefined Array Key Help

    Hi, I am getting a PHP Warning of undefined array key on the following line. Wondering how I can adjust this function to get the warning to go away? $rows[$key] = $row['id']; which is inside the following function function getWorkingPapers() { if(get_field('working-papers'...
  5. W

    PHP PHP/WP problem with code, trouble accessing custom archive links

    Hello, I have an old custom WP site that was working fine running PHP 7.3.9 and WP 4.9.18 and since upgrading to PHP 7.4.21 and WP 5.6.10 the archive links by year to access older data are no longer doing anything other than reloading the same page. I was wondering if someone might be able to...
  6. W

    JavaScript How to triple nest quotes in JS?

    Hi, how can I triple nest quotes so jQuery(".navigation a[href*=#"+rnrSection+"]").parent().addClass("active"); has quotes around the # sign? I am getting an Uncaught Error: Syntax error, unrecognized expression: .navigation a[href*=#”+rnrSection+”] that I think has to do with that.
  7. W

    PHP PHP events not showing when date is today.

    Hi, I have some old PHP code I am trying to sort through and it is for pulling 3 upcoming events and I guess it was written so todays event doesn't show and am trying to fix that. I was wondering if anyone can make sense of this? <ul> <?php $urlSplits =...
  8. W

    PHP RSS Feed aggregation changing date to todays date everytime feed is aggregated

    Hey, was wondering if someone might be able to rummage through the following and provide some insight as to why this custom RSS feed aggregation code is returning the current date and not the actual pub date? The key variable here is $cleanDate I believe. This is using some older RSS aggregation...
  9. W

    PHP How do I limit the for loop count?

    Hi, the following works fine but I’d like to limit the max number of items pulled at a given time? Wondering how to do this? function rssNews() { $items = xmlFeed('research'); $items = orderByDate($items); $output = ''; $output = '<ul id="rssnews">'; if (count($items) >= 2)...
  10. W

    JavaScript Uncaught TypeError using hammer.js

    Hey, I am working on an old site that was using hammer.js v1.0.5 (https://hammerjs.github.io/) and jQuery 1.8.3. I am currently trying to upgrade hammer to the newest version (v2.0.8 > https://hammerjs.github.io/dist/hammer.min.js) and jQuery 1.12.4 w/ Migrate and am getting an Uncaught...
  11. W

    PHP WordPress/Advanced Custom Fields/ PHP Rand

    Hey, I have this PHP/ACF code for WP that pulls the latest 2 entries and am wondering how to adjust this so it would just pull random entries instead. Thanks! function getLatestPhotos() { if(get_field('photos', 34)) { $latestPhotos = '<ul class="photo-list">'; $paperCounter...
  12. W

    PHP Help with if/else statement for WordPress function

    Hey folks, I've got some code that pulls several upcoming events posts and displays them on a home page. It work fine but if there are no upcoming events scheduled then there is nothing that shows up and I’d like to revise this so it displays a little ‘No events currently scheduled’ text. Any...
  13. W

    Downtime Cron that sends an email?

    Hey, wondering if anyone has any ideas that might be better than this one I yanked off Github. Looking for a bash script I can run a cron on several times a day that auto checks a list of domains to see if any are down. #!/bin/bash # List of URLs to check. urls=( https://www.google.com...
  14. W

    JavaScript calling jQuery and Migrate these days

    Hey, I am upgrading an older site that was using jQuery 1.8.3 and am bumping jQuery to 1.12.4 and using the 1.4.1 migrate plugin for the time being. I see that jQuery had been called the following way <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script>window.jQuery...
  15. W

    JavaScript Leave input:hover active if input has focus

    Hey, I have an input field .search-form input[type="text"] and it is hidden until the following :hover css .search-slide { left: -9999px; position: absolute; top: -9999px; white-space: nowrap; } .search-form:hover .search-slide { left...
  16. W

    JavaScript JS working in Firefox not Chrome/Safari

    What am I missing here? I have a back to top link script working in Firefox which no longer works in Chrome or Safari wondering if anyone notices anything here? I have added alert messages through the script to test and make sure the entire script is running and am able to get prompts at every...
  17. W

    How to mysqldump in a more secure way?

    How can I get the following script to be more secure? I am getting a mysqldump warning. mysqldump: [Warning] Using a password on the command line interface can be insecure. # Dump MySQL in staging area echo "------------------------------------------------" echo "Dumping MySQL..." mysqldump -h...
Back
Top Bottom