Muhammad Qasim
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Update, Save, and other options goneYou might have enabled distraction free mode. Press Alt+Shift+G if on Windows, or Shift + Command + \ if on Mac.
Forum: Everything else WordPress
In reply to: Delete a post or topicHi,
You can use Removal Tool in Google Search Console to request removal of any image or page of your site from Google’s search index.
Forum: Developing with WordPress
In reply to: Show a text in menuYou are making mistake in your code. Use this instead:
add_filter( 'wp_nav_menu_items', 'add_search', 10, 2 ); function add_search( $items, $args ) { if ( $args->theme_location == 'primary' ) { $items .= '<li>Custom HTML</li>'; } return $items; }
You are welcome ??
Forum: Localhost Installs
In reply to: Can’t install plugins on my localhost WP applicationAdd this line at the end of wp-config.php file. (Its it root directory of WP install)
define('FS_METHOD', 'direct');
After that restart apache server.
- This reply was modified 11 months ago by Muhammad Qasim.
Forum: Fixing WordPress
In reply to: error when adding code tu function.phpFor body, use this:
function body_code() { ?> add your code here <?php } add_action('wp_footer', 'body_code', 999);
It will add your code just before </body> tags. Don’t forget to replace add your code here with your code.
Forum: Fixing WordPress
In reply to: error when adding code tu function.phpHere’s a better approach.
In your functions.php, add this code
function analytics_code() { ?> add your analytics code here <?php } add_action('wp_head', 'analytics_code', 999);
This will add your code before </head>. The 999 priority ensure that your code is last thing in the <head> i.e. it will be just before </head>.
Forum: Fixing WordPress
In reply to: error when adding code tu function.phpYes you can. Created header.php file inside the child theme, copy all the code of header.php from parent theme and paste it in header.php in child theme. Then add your code before </head>. This way it won’t be affected even if you update theme.
Forum: Fixing WordPress
In reply to: error when adding code tu function.phpHello,
The simplest solution is to add it in header.php and footer.php file. In header.php, you can add it before </head> and in footer.php you can add the footer script before </body>
However, the downside is when the theme is updated, you will need to add the codes again.
Forum: Fixing WordPress
In reply to: Plugin ConflictOK, can you try enabling the Safe Mode in Elementor and see if the problem persists? You can enable it from Elementor -> Tools -> Safe Mode.
In Safe Mode, Elementor is isolated from your installed themes and plugins. Now, try deactivating every plugin (except Elementor and Elementor Pro). When the issue is fixed, try activating the plugin one by one to find which one was culprit.
Don’t worry, in safe mode, only logged-in users are affected, your site visitors will continue to see your site as they should.
Forum: Fixing WordPress
In reply to: Plugin ConflictHi,
Can you explain the problem that plugin is creating? That would help in identifying the problem.
Forum: Fixing WordPress
In reply to: Install website from a zip fileHi @shebinkk
- Upload the zip file in the public_html directory on your host and unzip it. Make sure that all unzipped files are in the public_html directory, not inside a sub-folder there.
- Make a database and note the database username, password and database name.
- Open the database with phpMyAdmin and import the data from the database file you have.
- Edit the wp-config.php file and add your new database details there.
This is summary of steps. If you need clarification of any step, feel free to ask.
Forum: Developing with WordPress
In reply to: Using a clone to install new themeIf your hosting supports staging sites, that would be best choice.