Tag » Posts Tagged ‘wordpress’

How to fix WordPress 404 Error on saving a new post or updating a post?

I was working on a blog post and had written a part of it and saved it. After some days, I visited the post again to complete it but it would not save, clicking on “Save Draft” button displayed a 404 not found page.

I tried to edit the post with same new content multiple times but same 404 error. Then, since I already had some post content saved, I tried to save it again with no update; it worked. So, I started updating the post content in steps, it was working and content was saving.

Continue reading »

Child theme stylesheet loading before the parent theme stylesheet

Wordpress

I was creating a child theme for a wordpress theme. I created style.css file in child theme which overrided some of the parent theme styles and a functions.php file which included the parent style.css as below:


<?php
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
?>

Now when I activated the child theme from Wordpress admin, changes in the child theme were not reflecting. I checked the browser source code and found that the child style.css was included before the parent style.css.

Continue reading »

Create a new admin account in WordPress via FTP

Wordpress

If your Wordpress admin account get locked then you can try to restore admin account access by using the “Lost your password?” link on the admin login page or you can try to reset your password by directly updating it in database.

There is one more way if you have FTP access to your Wordpress installation folder. Guess How? By creating a new admin account.

Continue reading »

How to change the “Reply” text in the comments listing and add a custom css class to the “Reply” link?

Wordpress

If you open the comments.php template file and look at the source code you will find that “wp_list_comments” function is used to display the comments listing. To change the “Reply” text your can pass “reply_text” parameter to “wp_list_comments” function.

Similarly to customize the comments listing frontend design you can pass a callback function as parameter to “wp_list_comments” function.

Continue reading »

How to Add a Smooth Scroll to Top Effect in WordPress using jQuery

Wordpress

We had discussed “How to Add Smooth Page Scroll to Top using jQuery” in one of our previous posts. Now lets see how to implement the same in Wordpress.

Step 1: Paste the below HTML any where in your theme’s footer.php file.


<a href="#" id="scrolltotop" title="Back to top">Back to top</a>

Continue reading »

What are WordPress Post Formats, why & how to use them?

Wordpress

Post Formats is a theme feature introduced in Wordpress with version 3.1, means it will only be available if your theme supports it. A post format is a meta information that can be used by themes to categorize the posts to present them differently.

Continue reading »

Back to top