Categories
CMS Mastering Development Wordpress

Plugin Architecture Question: How to avoid using transients

I am creating an in-house plugin that will offer a filtering mechanism using AJAX for any post type depending on the configuration, which I have stored in a JSON. When the plugin is loaded, I need to set the callback for the AJAX call, and I set that right away (I’m sticking to OOP): $gfb […]

Categories
CMS Mastering Development Wordpress

Potential Security Issue in Custom Taxonomy Search Functionality

I’m wishing to add some functionality to a client WordPress site that allows you to include taxonomy terms from custom post types in the WordPress search, and come across the following answer: Include custom taxonomy term in search This solution does work, but in the comments a user has mentioned that it’s “probably not a […]

Categories
CMS Mastering Development Wordpress

Redirect a list of URLs to another URL, using functions.php

What I wish to do I have a number of WordPress URLs I need to redirect, along with a 301 permanent redirect header being sent to browser. The URLs to redirect are: https://www.mydomain.com.au/search-result/?location=victoria https://www.mydomain.com.au/search-result/?location=new-south-wales https://www.mydomain.com.au/search-result/?location=queensland https://www.mydomain.com.au/search-result/?location=south-australia https://www.mydomain.com.au/search-result/?location=tasmania https://www.mydomain.com.au/search-result/?location=northern-territory Where to redirect to I want to redirect them to the home page: https://mydomain.com.au/ I am not […]

Categories
CMS Mastering Development Wordpress

Overrite parent functions using child functions

So I’ve tried a few different ways to override a method inside the parent theme and I’m not having much luck at all. So here is the structure: themes/ – wp-starter — custom_header.php – wp-starter-child — custom_header.php I have a method inside the parent custom_header.php as shown below: function wp_bootstrap_starter_custom_header_setup() { add_theme_support( ‘custom-header’, apply_filters( ‘wp_bootstrap_starter_custom_header_args’, […]

Categories
CMS Mastering Development Wordpress

Make image shrink as soon as screen gets smaller, before the side of the screen touches the image

I’m trying to achieve something but i don’t know the right way to do this. Hopefully someone can help me in the right direction. With responsive images the image will get smaller as soon as the screen is as big as the image and then the image will get smaller together with the screen (if […]

Categories
CMS Mastering Development Wordpress

Dropped srcset candidate “

I use the Divi theme on my WordPress site and I am using their theme builder to design all of my category pages. I found this template which I like the look of – https://divisoup.com/css-grid-blog-layout/ This includes adding the below JavaScript code to do some of the design as well as the following CSS too. […]

Categories
CMS Mastering Development Wordpress

What will make Woocommerce REST API to issue 401

https://www.example.com/wp-json/wc/v3/orders?consumer_key=123&consumer_secret=abc is working on when entered into the browser but fail with CURL with error {“code”:”woocommerce_rest_cannot_view”,”message”:”Sorry, you cannot list resources.”,”data”:{“status”:401}}

Categories
CMS Mastering Development Wordpress

Cannot access parts of a certain site

https://marthawilliamson.com/video-archives/ https://marthawilliamson.com/remembering-valerie-harper/ I’m trying to access specific parts of the following website, but I keep getting this error message instead. Error thrown Call to undefined function simple_fields_get_post_group_values() Does anyone know why I am getting this, and if this can be fixed? Thank you.

Categories
CMS Mastering Development Wordpress

Using Ads in podcast wordPress

hello i need to create a platform in wordpress that allow me to upload some podcasts and then use them in other platforms like spotify… using rss field. The problem is i need as well to create a podcast Mid-roll ads and change the ads manualy Whenever i want. is this possible in wordpress ?

Categories
CMS Mastering Development Wordpress

Create Media via REST API from Android Application

I am not sure if this post will be considered as duplicate since the same is on stackoverflow.com. I am trying to upload a file to WordPress using REST API. I have tried different headers, values but no luck. I have tried different clients such as okhttp and custom one such as Fast-AndroidNetworking. I have […]