Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

0 votes
Accepted

How to disable Yoast meta description for all pages

This should do the job: <?php /** Plugin Name: wpse425362 Description: Site specific code changes for example.com */ if (!defined('ABSPATH')) exit; // Exit if accessed directly /** * Removes ...
Chris Cox's user avatar
  • 1,292
0 votes

Is it possible to use Classes between WordPress plugins with separate namespaces?

Its likely due to the WordPress load process. Plugins are not all loaded at once. It's possible that when you in the constructor phase on one plugin the other plugin is not yet loaded. This means you ...
Matt Knighton's user avatar
0 votes

Trying to Find the PHP File/Function that Handles a Specific Form Action URL

The URL you are looking at does not exist in the filesystem, it's a WP rewrite rule. Ugly URLs look like this: index.php?queryvar=value Pretty URLs look like this: /my/pretty/permalinks But if your ...
Tom J Nowell's user avatar
  • 59.4k
0 votes

Detect when any plugin is activated or deactivated

There are a few plugins that can track this plugin data. One of them is https://wordpress.org/plugins/plugin-activation-tracker/
Vaibhav's user avatar
0 votes

Newspaper theme, custom query vars, & custom rewrite rules

Normally, my-custom-page/ would be rewritten to index.php?page_id=2 (or whatever the ID of that particular page is). Your rewrite is omitting the page_id var, which is why you're getting the blog ...
Chris Cox's user avatar
  • 1,292
0 votes
Accepted

How do I resolve "Some required plugins are missing or inactive"?

To find out which plugins don't have their required dependencies installed and activated, load the plugins page in the WordPress admin interface, and look for the plugin that has this message next to ...
Flimm's user avatar
  • 683
0 votes

Ajax gives 400 error

I've had the same issue. The problem is you are trying to register the hook from within the widget construct itself which is not the correct way. Instead you need to actually do this from within the ...
carlossantana's user avatar
0 votes

How do I show a different homepage to logged in and non-logged in users?

Here's one more plugin solution - https://wordpress.org/plugins/different-home-for-logged-in-logged-out/ Literally: "Set different Homepage for your Logged IN and Logged OUT users"
rothschild86's user avatar
0 votes

How to add styling and script to a custom widget plugin

To load JavaScript and CSS for your WordPress widget class calendar_widget extends WP_Widget{ function __construct(){ parent::__construct(false, $name = __('New Calendar')); } // ...
Aman Singh's user avatar
0 votes

How can I make my custom shortcode work in a Custom HTML Widget?

For the Custom HTML Widget it's better to use this hook: add_filter( 'widget_custom_html_content', 'do_shortcode' );
indigit's user avatar
  • 41
1 vote

How to generate/update a XML sitemap without plugins?

Wordpress has an XML sitemap feature built in since 5.5 that you can customize. See this blog post for more details and some quick examples. Take a look here to see a list of hooks you can use to ...
Talk Nerdy To Me's user avatar
1 vote

Redirect OLD/Path to NEWURL/Path

<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^olddomin\.com RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L] </IfModule> This is what you're looking for, before ...
Chris Cox's user avatar
  • 1,292
1 vote

How do I know if an archive correspond to a custom post type taxonomy?

You could consider using is_tax: Determines whether the query is for an existing custom taxonomy archive page. You can pass in the taxonomy slug to test if the current taxonomy archive page is for ...
Wongjn's user avatar
  • 266
2 votes
Accepted

Wordpress Gutenberg Custom Block the viewScript does not get loaded on the frontend when my block is inserted

Problem solved. If there's anybody that has the same problem as me, go into the *.php file where you're trying to render the block. Make sure that you're using the_content() in order to render the ...
Daniel V.'s user avatar
  • 131
1 vote
Accepted

Adding "Changelog" as a second tab to the auto updater custom plugin

I believe you have to add it into your plugin data array, see below: $packages['plugin-slug'] = [ 'versions' => [ '1.0.0' => [ 'name' => 'WP Awesome ...
Tony Djukic's user avatar
  • 2,108
0 votes

Unable to login - critical error

It appears that one of WP Engine's mu-plugins is being run on an environment that is not WP Engine? If that's true, then removing the mu-plugin fully (and other WPE plugins) from your environment is ...
Caleb's user avatar
  • 1,782

Top 50 recent answers are included