[Support request] move blog summary page to secondary location

Home Forums Support move blog summary page to secondary location

This topic contains 25 replies, has 3 voices, and was last updated by  Leo 3 months, 2 weeks ago.

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #984098

    Leo Customer Support

    For the different logo on home page, you can use this filter:
    https://docs.generatepress.com/article/generate_logo/
    https://codex.wordpress.org/Conditional_Tags#The_Main_Page

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    As for different colors on the home page, we can use CSS for that.

    What are you looking to change?

    #984108

    Steig

    Is there a way to make posts page be driven by CSS changes? I have a second church that is asking for this same approach, which is why on staging the posts page got moved to the extension 001-001. I would then just increment the numbers for different churches. I’d need to load a different logo to the posts page and probably change the navigation bar color. The home page would just stay constant with some marketing language.

    #984335

    Leo Customer Support

    Is there a way to make posts page be driven by CSS changes?

    What changes are you referring to?

    If you add body.blog in front of the CSS selector then it would only apply to the main posts page.

    An example to change the navigation color on the blog page would be:

    body.blog .main-navigation {
        background-color: #000;
    }

    Changing the logo would require the filter I mentioned above.

    #987521

    Steig

    I’d like to go back to the post from Leo on Aug 10 with the suggested code for when the posts header logo is clicked, it would refresh that page. It’s not quite working the way I need it to.

    add_filter( 'generate_logo_href', function( $url ) {
        if ( is_home() ) {
            return 'URL ON POSTS PAGE';
        }
    
        return $url;
    } );

    Here’s the code. I replaced the ‘URL ON POSTS PAGE’ with the actual URL assigned to the posts page. I’d think that would be pretty static, but when on that page, and I’ve used the menus to narrow the view of the posts being looked at, clicking the logo just takes the viewer back to the static howe page. My goal is to keep the viewer in the silo of the posts page they currently are viewing.

    Could you modify the code to do that?

    *edit*
    Maybe instead of making the posts page header logo clickable at all, another category menu could be introduced that says “All Posts” that would return the viewer to the all posts again?

    #987558

    Leo Customer Support

    Not sure if I fully understand.

    The code isn’t working at all.

    Can you link me to the posts page?

    #987574

    Steig

    I’ve updated the URL to point to the posts page. When at the main posts page, click the logo to reload and everyone reloads OK. Then click on the categories to filter the view and then click the logo. The goal is to take the viewer back to that top level. But instead, it take the viewer to the static home page.

    #988127

    Leo Customer Support

    What if we change the logo URL for posts page, all archives and single posts?

    add_filter( 'generate_logo_href', function( $url ) {
        if ( is_home() || is_archive() || is_single() ) {
            return 'URL ON POSTS PAGE';
        }
    
        return $url;
    } );

    You can find all the available conditional tags from WordPress here:
    https://codex.wordpress.org/Conditional_Tags

    #988427

    Steig

    OK, that worked well. The posts page currently draws the logo that shows at the top from the Site Identity section of the theme. How can I change that to just be a logo that I link too in the media folder?

    #988486

    Leo Customer Support

    Like to use a different logo image?

    If so this should help:
    https://docs.generatepress.com/article/generate_logo/

    #988764

    Steig

    The problem is that I’m using categories as a way to split up the posts into different groups. Those categories turn in into the menu choices you’ve seen in the navigation bar.

    This filter swaps out the logo based upon the category. Is there a different way to do it?

    #989019

    Leo Customer Support

    This filter swaps out the logo based upon the category.

    That’s only because the example is using is_category() as conditional tags.

    You can use the exact conditional tag as above to match the URL filter:
    https://generatepress.com/forums/topic/move-blog-summary-page-to-secondary-location/page/2/#post-988127

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic.