New answers tagged

0

If this is relatively static code treat it as such and put it in a file or template. There are a couple of easy ways of doing this. Via templates Look at the way that WP does it - you have a folder called template-parts - insert your code there and call it in a template type. Assign that page to that template type. Via a file Above you mention this is for a ...


1

Looking at the login_header() function, it appears that you can use the login_message filter. add_filter( 'login_message', 'wpse386695_change_message' ); function wpse386695_change_message( $message ) { $message = str_replace( 'Your password has been reset', __( 'The text you want to appear', 'plugin-text-domain' ), $message );...


1

If you give a look at the documentation, of str_replace you will find your needs. https://www.php.net/manual/en/function.str-replace.php There is 3 choices for you there : function replace_text_wps($text){ $replace = array( 'https://www.facebook.com/something">' => 'https://www.instagram.com/something">', ); $text = ...


0

It looks like the plugin "Simple local Avatar" is going to do what you need, once this new PR lands: https://github.com/10up/simple-local-avatars/issues/26#issuecomment-814157532


1

Here's my two cents on the subject. Both Open-Source. Cent number one: ClassicPress There is a quite stable and good-looking fork floating around called ClassicPress. The people behind ClassicPress want to go back to the roots and are putting a big focus on making decisions as democratic as possible. It's actually a registered nonprofit organization and has ...


0

Check out different plugins like "User Submitted Posts", "WP User Frontend", "ACF Frontend" or similar.


2

In case if you need to edit the block_formats dropdown, you can do this in that way: add_filter('tiny_mce_before_init', function($init_array) { $block_formats = [ 'Paragraph=p', 'Heading 1=h1', 'Heading 2=h2', 'Heading 3=h3', ]; $init_array['block_formats'] = implode(';', $block_formats); return $init_array; })...


0

Use the query_vars filter to add a new query variable to store the template version (minimal / complete). add_filter( 'query_vars', 'se385568_query_vars' ); function se385568_query_vars( $vars ) { $vars[] = 'tpl'; return $vars; } Add a rewrite rule (codex) to recognize the new link format and set the newly created query variable add_action( 'init', ...


0

Try this updated code. It should work: You can check this url for more information https://awhitepixel.com/blog/woocommerce-product-data-custom-fields-tabs/ add_action( 'woocommerce_product_options_general_product_data', 'add_custom_fields_seo'); function custom_fields_save_seo( $post_id ){ $product = wc_get_product($post_id); $num_package = isset($_POST['...


Top 50 recent answers are included