It’s best not to edit theme files directly, because when you update the theme, your changes are lost. Instead, if you need to change things, create a child theme and you can do whatever you need there.
To restore the previous file you can either download a fresh copy of your theme, or look through your backups.
Related Posts:
- Get_the_author doesn’t return author name
- Retrieving Author ID in wp-admin area
- Disable Attachment Pages Completely
- Inject post (from specific category) between posts in Loop
- Remove option to allow trackbacks/pingbacks from post page options
- How to get year, month and hour in WordPress?
- Allow authors to post only in categories they create in WordPress
- Handling an Ajax form submit
- New Plugin Review
- Print number of post (in reverse)
- Use template for posts with a particular category grandparent
- Count number of published posts by type
- Automatically generate Post/Page from searched Database item?
- Get taxonomy terms only of the WP_Query current posts
- How to get 2 or multiple custom post types in wordpress functions.php
- Displaying a button on each post
- Hide post if matches current month and year
- Creating bulk posts with Youtube videos
- How Can I Call Up The Author’s Name on a Post
- Automatically add custom CSS to new posts using a category template
- How Display Posts on category
- Getting a specific post values to another div or modal
- Displaying the last post on static homepage
- Unreadable pagination
- how do I get a specific post from a post with a subcategory in WP
- How can I add extra word in permalink when someone click download button?
- Open post-content in archive page in a Modal box with bootstrap
- edit_comment_link is not showing for comment author
- remove post that has no content
- Custom posts in different columns style
- How to show only subcategories in parent category not parent category?
- Remove author link wherever author’s name is display
- WP Insert Post and then go to post
- How to avoid duplicates when creating recent network posts
- Get latest post from all categories except one
- Update post title from external file?
- Parse error: syntax error, unexpected end of file
- Automatically add images to a menu
- set post limit at load more ajax wordpress
- Array to string conversion on array_map
- Store metakey value as an array
- Only show first image in foreach loop
- How to use mysql LIKE with wpdb?
- Do I need to edit my theme in order to change the title of my blog page?
- create front-end users post list by specific category
- Incrementing PHP variable onclick to display posts by month
- Do not duplicate posts with multiple categories in multiple loops
- show recent posts php code error?
- Error display post thumbnails for previous and next post
- Post to WordPress from another Server via PHP
- WordPress Search
- Update value of a associative array with update_post_meta
- Wrap posts p tags in div
- How to change the author box selection on a post to a custom taxonomy
- get value from get_post_meta then reuse it in another get_post_meta
- Edit and delete permissions pages and posts
- Generating 10 000 WordPress posts using PHP and avoiding Server Timeout error
- If Post Published Date or Modified Date is 1 Year or Older, Display Notice on Post Page
- WordPress Post Block Element not properly parsed with the_content filter
- Filter wordpress posts without searching the keywords in the post content
- Build A Custom SQL Query for WordPress Search
- WordPress Custom Form – Getting Query Vars, Weird Glitch?
- Post form – AJAX won’t upload featured image – Plugin development
- Remove Author Links
- WordPress sorting posts by date and title using a dropdown
- posts_per_page displays only 2 posts instead of 4 posts
- How to get post titles by post ID and integrate with my code?
- Trying to get post ID outside loop on blog page
- Infinite looping next post link within a certain category on a post
- Split post or page content in two or more columns
- Enqueue script only on child pages of custom post types
- Attach and retrive multiple pdf files to post or page
- Check the database for a postmeta field
- Get list of posts from attachment
- How to use a PHP file to control the content of a blog post
- Following/Followers Users list Using Ajax Pagination inside Author Profile
- When working with a post, almost all wp_postmeta are deleted
- Displaying POST content with HTML tags and all
- Pagination in WP Queries
- Using Tag Groups: Displaying groups and adjacent tags of current post
- Add div after every 4 posts then every 2 posts for a responsive loop
- Only display notification on single post
- Display 6 most recent post on homepage?
- Only Get A Certain Number of Posts From WP_Query
- Apply filters when loading post via ajax
- Get posts associated with media attachment
- Can’t put a hyperlink on Featured Post’s Image
- How to call post title and post summary to other part of site?
- Published custom posts missing
- WordPress get_post_meta issue
- Automatically create a loop for post ID
- Display pages from specific page template
- Add Custom Post Type on the Fly or create an array
- WordPress article with 50 000 words loading slow – 100% cpu
- Display post of specific category on page
- How to display the date under the post title?
- Excerpt all post content Content Same Size without word cutting off
- WooCommerce: write featured image dimensions to custom fields in product’
- transition_post_status hook, works – but not if the post is new
- Warning: Undefined variable $post_id