• Resolved fvbussel

    (@fvbussel)


    Header, footer and the custom page are visible but the first sentence of text of the standard error page is showing on top of the custom error page.

    I use /%postname%/ in the permalinks and saved the option page again.
    I cleanup the tables.
    301 and 302 are working fine.
    … does not work correctly with 404 option.
    ????

    I’ve read in one of the post:
    “So, 301 and 302 redirects work great!!

    however the 404 redirect to a custom page does not work correctly. I just get a blank page with my header and footer in it, but no content.

    my Permalinks are set to ‘Post Name’”

Viewing 15 replies - 1 through 15 (of 15 total)
  • Ideally share you domain ( note sharing is public as you didn’t add it in the topic option – or if you can edit the topic or start a new one )

    Also provide screen shots so I can understand what you are saying.

    You can use any image sharing service and link to that.

    Thread Starter fvbussel

    (@fvbussel)

    Dear Alan,
    Here some information of whats going wrong. The site is in dutch.

    Permalink: https://kerstshow.com/%postname%/
    URL (WordPress with Astra theme):
    URL
    Good (with 302 option): Option 302
    Wrong (with 404 option): 404 option
    Original (plugin deactivated): Deactivated

    Frans

    Many thanks, will investigate this.

    I have investigated.

    The wording is added by Astra which specifically replaces the post title.

    I’m not an expert in Astra but have had a look for you.

    You can set this back using a filter as below

    add_filter(
    	'astra_the_404_page_title',
    	function ( $title ) {
    		return get_the_title();
    	},
    	10,
    	1
    );

    If you are unsure how to apply I can advise.

    But I see no harm in adding this into the plugin anyway as Astra is a popular theme. So I will do that.

    V 1.8.5 release with that filter to cater for what Astra does to page titles

    That should work but let me know.

    Thread Starter fvbussel

    (@fvbussel)

    Works with a mistake…
    the featured image and the page title are now visible. Both should not be visible and the preview via editing mode looks fine.
    See https://kerstshow.com/test

    Astra options.
    Title = Foutenpagina

    • This reply was modified 2 years, 5 months ago by fvbussel.
    • This reply was modified 2 years, 5 months ago by fvbussel.

    Can you explain a bit more.I don’t quite follow the brief description?

    Thread Starter fvbussel

    (@fvbussel)

    It is possible in editing mode of the page to chose a picture as “highlight” image. Astra adds on the same page in a box some posibilities. One posibility is not showing the title and another is not showing the highlight image. Both are checked and should not be visible but they are.
    The image on top of the page is the highlight image and the title is Foutenpagina.

    Thanks, interesting. The filter ONLY impacts the page title text.

    This seems to be very specific to Astra but will have a further investigation.

    OK I dont think I’m looking at the same thing

    This is my test site with Astra installed -I dont see such options

    2022-10-11-20-25

    wrong image

    2022-10-11-23-08

    Thread Starter fvbussel

    (@fvbussel)

    I switched to another domain / website with the same problem.
    URL: wordpress fvbussel
    Theme: Astra free
    Plugin updated.
    Redirection: page Frans

    Without wordpress (not logged in):
    Tested with test link
    302 option: screen 302 … Looks good.
    404 option: screen 404 … Looks wrong.

    With wordpress (logged in):
    edit mode page Frans: pageFrans-edit
    preview mode page Frans: pageFrans-preview

    Thanks for the screenshots.

    My install of Astra doesn’t have that Astra Instellingenbox, I assume that comes from something else e.g. another plugin or Astra Pro.

    Probably the easiest thing to do is just remove the image and header on the 404 page, by additional CSS if you don’t want them. ( there probably are filters in Astra or Astra Pro or what ever you are using but that goes well beyond the scope of support for the plugin, basically the plugin does what it is meant to do, and Astra / some other plugin is doing something extra )

    body.error404  header.entry-header{
      display:none;
    }

    would do the trick

    Thread Starter fvbussel

    (@fvbussel)

    The code (body…) works fine with the 404 option of the plugin.

    Thank you for your effort.

    A pleasure. And I learned a bit about Astra too.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Custom 404 error page not showing correctly 2’ is closed to new replies.