Jump to content
Sign in to follow this  
keyoung

How To Edit Single.php

Recommended Posts

keyoung

How can I edit "single.php"? Platform pro child is active. I also want to add another template "single2.php"? I am only used to traditional wordpress themes, so if you are kind enough to answer, please go step by step ;) Thanks!

Share this post


Link to post
Share on other sites
bryan-hadaway

Copy single.php over to the child theme (Base) and then you can edit it directly from Appearance > Editor. Thanks, Bryan

Share this post


Link to post
Share on other sites
keyoung

Thanks... I want the post to show a custom field. It does. But now it doesnt show what I put in the main article text field. What am I doing wrong?? Thanks ` <?php /** * The Template for displaying all single posts. * * @package WordPress * @subpackage Twenty_Ten * @since Twenty Ten 1.0 */ get_header(); ?>

<?php $custom_field_1 = get_post_meta($post->ID, "custom_field_1", true); echo $custom_field_1;?> <?php /* Run the loop to output the post. * If you want to overload this in a child theme then include a file * called loop-single.php and that will be used instead. */ get_template_part( 'loop', 'single' ); ?>
<?php get_sidebar(); ?> <?php get_footer(); ?> `

Share this post


Link to post
Share on other sites
bryan-hadaway

Let's get a developers eyes on this... Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

You need to add your single specific code to the main template.postloop.php file using conditional statements. Take a look at that file and you'll see what's going on.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×