• Resolved blogmom

    (@blogmom)


    especially the Post format. I want to add the Featured Image to the Post’s page, change the byline text, suppress the Leave a Reply area (or add some text around it) and make other cosmetic changes. Overall just want to customize these Posts pages. I found this in the forum https://www.ads-software.com/support/topic/custom-page-templates-11?replies=6 and maybe that is my answer, but honestly I don’t understand it. If that is the answer, and I coped index.php into a new file named “single-custompost.php” I wonder, how does the theme know to use my file “single-custompost.php”? Or I am totally misunderstanding this? Hoping someone can help me understand how to customize my Posts pages. Thanks!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey blogmom,
    If I’m understanding what you want to do you should actually create a Child Theme to the Parent Theme that you’re working with. (https://codex.www.ads-software.com/Child_Themes)
    Then in your Child Theme you would copy whatever files you want to change and make the changes there. You wouldn’t need to create a single-custompost.php because WP would automatically (and only) use the custom page.php (and any other files) in your Child Theme while leaving the rest of your Parent Theme alone.

    Thread Starter blogmom

    (@blogmom)

    Bingo! Thanks Justin. All this time I thought child themes were for style.css only. I copied index.php from the theme into “single.php” in my child theme and it works beautifully. But… in this file I see directive

    do_action( '__loop' );

    how do I go about tweaking the output of that to format to my liking?

    It depends on what exactly you want to tweak. CSS should be able to take care of most of it.
    However, if, for example, you wanted to change the text “This entry was posted on…” to “This post was published on…” you’ll also need to create a Parts folder in your Child Theme and bring over the class-main-post.php file and make the changes within the code.

    However, if, for example, you wanted to change the text “This entry was posted on…” to “This post was published on…” you’ll also need to create a Parts folder in your Child Theme and bring over the class-main-post.php file and make the changes within the code.

    I know this was just an example, but for simple changes like this I’m using the “Say What?” plugin. Works a treat.

    Thread Starter blogmom

    (@blogmom)

    Got it. Thanks guys! (ElectricFeet: neat plugin, thank you for sharing.. that will come in handy!)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to change page and post format?’ is closed to new replies.