Site logo

Archived topic

move blog summary page to secondary location

25 replies · Started by Steig on August 7, 2019

Viewing posts 16–26 of 26

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.

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.

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?

Not sure if I fully understand.

The code isn't working at all.

Can you link me to the posts page?

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.

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

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?

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?

This archived topic is closed to new replies.