Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

wordpress modifying single.php file, theme update

Posted on 2014-09-12
2
Medium Priority
?
207 Views
Last Modified: 2014-09-14
Hi,

If i need modify some code in theme files (like remove date or author ... without using css) in single.php, which the best approach, to prevent replacing files when update theme.
0
Comment
Question by:rflorencio
2 Comments
 
LVL 18

Accepted Solution

by:
Hube02 earned 1800 total points
ID: 40319475
Create a child theme, information can be found here: http://codex.wordpress.org/Child_Themes

It's pretty simple as your child theme really only needs a CSS file.

Once that is done, copy single.php from the parent theme into your child theme folder and make the changes there. Your now single.php file will override the parent template.
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 200 total points
ID: 40319529
And child themes are never overwritten when the parent theme updates.

(No points for my post, please. I'm just adding a clarification to Hube's perfectly correct answer)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
While Plesk offers many potential benefits to website administrators, including compatibility with Windows Server and other leading technologies, the company has also been working to differentiate it from other control panels for content management…
The purpose of this video is to demonstrate how to create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question