WordPress broken after domain name change

I’d use a Search/Replace plugin (I like “Better Search and Replace”) to change all instances of ‘olddomain’ to ‘newdomain’. Then I would look at the wp-options table to ensure the new URL is in there (in two places). I’d remove any URL-based settings in the wp0config.php file. (I never change those.) I’d also check the … Read more

How I can directly add drop-down in my product on shop page as show in below image

I guess you are looking for this Source : https://iconicwp.com/blog/show-variations-shop-page-woocommerce/ /** * Replace add to cart button in the loop. */ function iconic_change_loop_add_to_cart() { remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’, 10 ); add_action( ‘woocommerce_after_shop_loop_item’, ‘iconic_template_loop_add_to_cart’, 10 ); } add_action( ‘init’, ‘iconic_change_loop_add_to_cart’, 10 ); /** * Use single add to cart button for variable products. */ function iconic_template_loop_add_to_cart() { … Read more

Deleting my old WordPress site. – issues

There is no default option for delete a WordPress site from WordPress admin. If you want the website gone, you can just delete the database from cPanel/phpMyAdmin and delete all files. Of course, if you used a software install like Softaculous, there you will find an option to uninstall the website.

Display a list of subcategories (from specific Category) a post belongs to

So your problem is that you’ve essentially mixed up what looks like 3 separate attempts at a solution. There’s a lot of redundant code in there that’s making it confusing to read. The actual line of code that’s generating the output that you’re seeing is this one: $terms = wp_list_categories( ‘title_li=&style=none&echo=0&child_of=” . $parentid . “&taxonomy=’ … Read more

Change Notice of Password change email subject?

The $change_mail variable that you’re filtering has a subject value that you can modify the same way you modified the message: // Replace the default password change email add_filter(‘password_change_email’, ‘change_password_mail_message’, 10, 3); function change_password_mail_message( $change_mail, $user, $userdata ) { // Call Change Email to HTML function add_filter( ‘wp_mail_content_type’, ‘set_email_html_content_type’ ); $message = “<p>Test HTML email</p>”; … Read more

Customizer JS API get value of customizer field

You need to do it the same way you’d get options, shortcodes, or any other WordPress value into JavaScript: You need to get them with PHP and pass them to the script with wp_localize_script(): wp_enqueue_script( ‘my-script’, asset_path( ‘scripts/plugins.js’ ), [], null, true ); wp_localize_script( ‘my-script’, ‘myScript’, [ ‘galleryTransition’ => get_theme_option( ‘gallery_lightgallery_transition’ ), ] ); Just … Read more

Duplicated content with custom shortcode

Solution attempt Due to @AlexanderHolsgrove‘s comment, I tried reutrning a simple string, so instead of return wpautop($content); I tried return “test return”;. This outputted the string on top of the queried post content. Which is weird, because I do not echo nor do I return the post content in any way now. So I tried … Read more

Changing the the_author_posts_link() hover title

Yes, it is, but you’ll have to use get_author_posts_url() (see Codex). The example in the Codex is (not my code): <a href=”https://wordpress.stackexchange.com/questions/337513/<?php echo get_author_posts_url( get_the_author_meta(“ID’ ), get_the_author_meta( ‘user_nicename’ ) ); ?>”><?php the_author(); ?></a> You could add your own title=”My Better Title” in that <a> tag to make it say whatever you like: <a href=”https://wordpress.stackexchange.com/questions/337513/<?php echo … Read more

Create a page that dynamically loads data

You can create a shortcode function to use in your content eg. [data-display] which you would place in your custom plugin, child theme’s functions.php, or /wp-content/mu-plugins/ folder: add_shortcode(‘data-display’, ‘custom_api_data_display’); function custom_api_data_display($atts) { // for whatever you API call function is // you may want check $_REQUEST or shortcode $atts to modify $args = array(‘some_key’ => … Read more