In WordPress Recent Posts Widget , only show posts tagged with the current page url

/******* filter posts by tag based on page url ***********/ add_filter(‘widget_posts_args’, ‘wpsites_modify_recent_posts_widget’, 100000); function wpsites_modify_recent_posts_widget($params) { $url = sanitize_text_field($_SERVER[‘REQUEST_URI’]); $last_word = basename($url); error_log(“last word = $last_word”); $tags_filter_by = array(‘who’,’what’,’when’,’where’,’why’,’how’); // only do for these pages if(in_array($last_word, $tags_filter_by) ){ //$params[‘tag’] = ‘bread,baking’; posts with any of these tags $params[‘tag’] = trim(strtolower($last_word)); error_log(“filtering to only show posts … Read more

Setting up a Laravel app on Docker

Rough notes, will pull this togther in a blog post at later date. issue: The requested URL /login/ was not found on this server. resolution: add to manually enable mod rewrite on command line in the container: # launch a terminal in the container docker exec -it e39431779799 bash # enable modrewrite a2enmod rewrite /etc/init.d/apache2 … Read more

Adding javascript functions to Laravel Mix ( and why you get error Uncaught ReferenceError: function is not defined )

This one had me pulling my hair out the other day. I was using Laravel,  adding a javascript function to the app.js file ( also tried using require in app.js and pulling in my function ). Laravel uses Laravel Mix which is a wrapper for webpack. Yet with either approach I was getting the javascript … Read more

Exporting Forum data from BBPress

This is how to export data from BBPress, which would be useful if you wanted to migrate from BBPress to another forum platform. Its straight SQL export direct from the mysql database, with things like forum posts (topics ) and forum replies, as well as some other data including users ( and their user ids … Read more

The Covid-19 Pandemic is Changing Company Mindsets about Remote Working

This Covid-19 Pandemic has disrupted life as we know it. Businesses and companies are struggling to adjust to utilising and implementing different work options because of the lockdowns and quarantines in place. The positive trend that is happening though is more and more companies are adopting remote working set-ups to keep their businesses running amidst … Read more