• What files should I edit to change the structure and content of the posts echoed in the index.php page ?

    The ones with circles around them: https://i.stack.imgur.com/ckWGQ.png

    I tried editing content.php because it had the <article> tag in the begining but it’s not it.. it’s the template of the post after you click on it. and not before.

    I just want to edit the post previews “boxes”, (To add the author picture.. change the elements positionings.. etc’) When editing content.php it edits the post itself (for example, after I click on a post, I still see the post edits I made.

    Which file is the right one?

    **Using wordpress 4.1 Twentyfifteen theme which I deleted all CSS and changes some if it’s templates.. created new templates..

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    It appears content.php is correct, it apparently is used both as an index content and a single content. It uses if(is_single()) to output content specific for the single page. You could thus use if(!is_single()) (note the added ‘!’ NOT operator) to only output content on the index page.

    BTW, do not edit the twentyfifteen theme files, your changes will be lost when the theme updates! To protect your changes from updates, create a child theme.

    Thread Starter Hatul666

    (@hatul666)

    Thnx! That clears everything ??

    How do i create a child theme?

    Moderator bcworkz

    (@bcworkz)

    Child_Themes#How_to_Create_a_Child_Theme ??

    Lots of good stuff in the Codex, even though exactly what you need may not always be there. Always worth a search.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘What file should I edit to change the wordpress blog post list’ is closed to new replies.