[Support request] Show posts on static frontpage + use static pages as Category Archives

Home Forums Support [Support request] Show posts on static frontpage + use static pages as Category Archives

Home Forums Support Show posts on static frontpage + use static pages as Category Archives

  • This topic has 30 replies, 3 voices, and was last updated 4 years ago by Tom.
Viewing 15 posts - 1 through 15 (of 31 total)
  • Author
    Posts
  • #1192768
    Patryk

    Hey,
    do you know a easy way to show (selected) blog posts on static frontpage? I would like to show them in the same style as in the categories.
    Thanks a lot.

    #1192770
    David
    Staff
    Customer Support

    Hi there,

    you can use the WP Show Posts plugin:

    https://wpshowposts.com

    #1192780
    Patryk

    Hi David,

    thanks a lot.
    Do you know how can i show the posts in the same style as in the categories?

    #1192784
    Patryk

    It works fine when i turn my frontpage to dynamic but i would like to have a static frontpage with more content.

    #1192960
    David
    Staff
    Customer Support

    You can make a lot of the adjustments within the WP Show Posts list settings.
    First you would want to change the Columns to 1.
    Then adjust the image width to 300px and align it left.

    You can also enable post meta and read more button.

    Won’t be an exact match, but will get you close enough and if need be we can help with a little CSS to finish it off.

    #1192962
    Patryk

    Ok perfect David! Thanks!

    #1192966
    David
    Staff
    Customer Support

    Glad to be of help

    #1193487
    Patryk

    Hi again,

    now i use the WP Show Posts Plugin.
    When replacing my categories with pages (that show my category posts), I used this script as instructed https://docs.wpshowposts.com/article/use-static-pages-as-category-archives/. However, my posts will redirect to the category page. Is this a bug? Is there a way to have it go to the proper post (and NOT to the category page)?

    Here is the post example: https://www.patientenwerk.de/hausarzt/hausarzt-wechseln/
    There is a redirect to: https://www.patientenwerk.de/hausarzt/

    #1193566
    Patryk

    Can anyone help me please?

    #1193596
    David
    Staff
    Customer Support

    Thats odd – not seen this before.
    Can you share the exact code you have added to the site ?

    #1193606
    Patryk
    add_filter('request', function( array $query_vars ) {
        if ( is_admin() ) {
            return $query_vars;
        }
    
        if ( isset( $query_vars['category_name'] ) ) {
            $pagename = $query_vars['category_name'];
    
            $query_vars = array( 'pagename' => "$pagename" );
        }
    
        return $query_vars;
    } );

    Here is someone describing the same:
    https://wordpress.org/support/topic/using-wpsp-to-replace-categories/#post-12540308

    #1193655
    David
    Staff
    Customer Support

    I have asked Tom to take a look.
    Do you need to replace the Archives with Static pages ? Is it just a case of matching the WP Show Post and blog styles ?

    #1193663
    Patryk

    Thanks David for your help.
    I need to replace the categories with static pages. Its not only a case of matching the styles. In addition, the static pages should give me more options to set up the category content.

    #1193681
    David
    Staff
    Customer Support

    Thats understandable.
    Depending on the scope of your needs, you may find the Header and Hook Elements may give what you need:

    https://docs.generatepress.com/article/header-element-overview/

    https://docs.generatepress.com/article/hooks-element-overview/

    #1193687
    Patryk

    Ok, so there is actually no solution for the unwanted redirection?

Viewing 15 posts - 1 through 15 (of 31 total)
  • You must be logged in to reply to this topic.