Lost WordPress website access after changing URL [closed]

If you have a cPanel and have an access of phpMyAdmin on your host, then find your DB, check the “siteurl” and “home” fields are correct in wp_options Table. Or Add these two lines to your wp-config.php, where “example.com” is the correct location of your site. define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); Or If you have a cli access, … Read more

How do I transfer my plugin data?

Data should be stored on the DB, so your plugin should be saving all those QA on a table, so should be able to export that table and then you will have to know how the new plugin storages its data (which table and how) and you import there.

How can I create my own widgets in WordPress? [closed]

These below links will help you for creating own widgets in WordPress with step by step. https://kinsta.com/blog/create-wordpress-widget/ https://premium.wpmudev.org/blog/create-custom-wordpress-widget/ https://www.hostinger.in/tutorials/how-to-create-custom-widget-in-wordpress https://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/

get user role. parameter id return type string [closed]

You should use WordPress functions to get the user role by user id. Please try code given below: function user_role_parameter($user_id) { $user_meta = get_userdata($user_id); if ( !empty($user_meta) ) { $user_roles = $user_meta->roles; $user_role=””; foreach( $user_roles as $role ){ $user_role .= $role . ‘, ‘; } return $user_role; } else { return “”; } }

how to remove post comment box from my website? [closed]

In case you want to remove comment from home only, Then follow these steps. Click on edit of homepage. Click on Screen Options and the top right. From there check Discussion. After this below text editor you will see new option box for discussion. Deselect Allow comments from there Let me know if you face … Read more

Parse error: syntax error, unexpected ‘}’ in C:\xampp\htdocs\admin\products.php on line 148 [closed]

I have updated your code here. so use this below code. you have forgot close this ) in this line like this while ($row=mysql_fetch_object($query)) <tr> <?php include(‘sql_connect.php’); ?> <?php $sql=”select * from hp”; $query=mysql_query($sql); if(mysql_num_rows($query)>0) { $i=1; while ($row=mysql_fetch_object($query)){ ?> <th scope=”row”><input type=”checkbox” /></th> <td class=”tm-product-name”><?php echo $hp_model; ?> </td> <td><?php echo $hp_type; ?></td> <td><?php … Read more

styling the contents

I’ll refer you to the excellent template hierarchy diagram from the Codex, which explains how template files are chosen: That explains the “which page” aspect of your question, but you also mentioned modifying CSS based on content. The body_class() function should be a part of your template, and it will apply a number of classes … Read more