Support » Fixing WordPress » Edit WP Blog Page

  • Blogger

    (@rui-oliveira)


    Hi,

    I wanted to edit the Blog Page on my site.

    I am using Astra Pro, and even with all features there is something I can’t manage to do.

    To insert text and an image at the beginning of this page, is any way to have a text box and an image, and then the posts?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • When you select a Page to use for the Latest Posts page, you are actually surrendering that URL for use as an archive instead of a Page. This tells WP to change the main query to get latest posts instead of one Page and that changes which template file of the theme is used for output.
    So, while you can edit the Page that you chose, you can’t see that content anywhere until you change the Latest Posts page to some other Page.

    If the theme has front-page.php, the home page is rendered with that, and it has to handle both cases for home (page on front or posts on front). But the home.php template is used (if it exists) for the latest posts. In order to show other content than Latest Posts, the template would have to do another query or have a widget area or a special case filter on the_content.
    You can implement any of those in a child theme, but don’t expect to see Page content on Latest Posts page by default, since it is not the theme’s job to query for content.

    Other than that, we don’t support Pro themes here…

    Thread Starter Blogger

    (@rui-oliveira)

    Hi,

    Thanks for your help, I do have the Astra Child, which I am using.

    But my child theme only has style.css and functions.php

    Even the Astra Theme (regular) does not have front-page.php, but has content-blog.php (template-parts/content-blog.php), could it be this one?

    And what code I would need to insert to be able to use text?

    If there is no front-page.php and no home.php, you can copy the index.php of the parent theme to the child, and rename it home.php. Make sure that still works.
    Then you can add your choice of new code to that file. (extra query or widget area or content filter which has to do a query)
    You can read in the Theme Developer Handbook and look up functions in the Code Reference.

    Thread Starter Blogger

    (@rui-oliveira)

    OK, thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Edit WP Blog Page’ is closed to new replies.