Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tomdesawyer

    (@tomdesawyer)

    Thank you so much for your detailed response!

    It means a world!

    I have just one more question.

    if I were to copy page.php and rename it to category.php. Would that allow me to edit all category pages as the page? Like could I use a Gutenberg’s block editor or classic editor?

    I already tried going in the “edit theme” from the WP dashboard, I found page.php, copied the code and replaced the code with the archive.php. I couldn’t edit the category pages as I would edit the pages regularly. When viewing a category page, the admin bar would have a link “edit category”. This would link to a regular category editing screen which doesn’t do much.
    This theme didn’t have a category.php template but archive.php.

    I will try multiple solutions you linked to. Thanks again and if you have the time please let me know why my approach didn’t work from editing archive.php to have the exact same contents as the page.php

    Thread Starter tomdesawyer

    (@tomdesawyer)

    Hi Bcworkz,

    Yes! That’s exactly what I want to do. by altering the wp’s behavior I could evade the 301s and that is the goal. I don’t want 301s.

    Thank you for letting me know that this is possible!

    Can you give me an example of template_redirect php function in action?

    Like, how would a standard php code look like that would force all category pages to use a page’s template?

    Also, can you give me a php example function for this:

    “A particular category query could be altered to query for a specific page instead through the “pre_get_posts” action.”

    Thank you!

    If I am asking too much, I understand. Maybe these functions are complex. But in that case, can you let me know where can I learn more about them?

Viewing 2 replies - 1 through 2 (of 2 total)