Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Featured Image on "Home"-View #297

websupporter opened this issue Sep 27, 2016 · 1 comment


None yet
2 participants
Copy link

commented Sep 27, 2016

If you open the customizer you are on the "Home"-View. You go to Posts and you select a post, which is visible in this view. You change the featured image and after the refresh, the featured image is shown. From the Posts you select another post also visible on the "Home"-View and you change the featured image, the featured image of the first post you've edited is going to be replaced in the preview.

If you hit "save &publish" the featured images are saved correctly.

@westonruter westonruter added the bug label Sep 27, 2016


This comment has been minimized.

Copy link

commented Sep 27, 2016

Good catch. The problem is that the selector for the featured image partial is not specific enough. It's only looking for elements that match the selector [data-customize-featured-image-partial]:

$this->partial_selector = '[' . self::SELECTED_ATTRIBUTE . ']';

$this->partial_selector = '[' . self::SELECTED_ATTRIBUTE . ']';

Here is where the attribute is injected into the featured image element:

$replacement .= sprintf( ' %s="1" ', self::SELECTED_ATTRIBUTE );

$replacement .= sprintf( ' %s="1" ', self::SELECTED_ATTRIBUTE );

This needs to be changed perhaps so that the post/page ID for the featured image is supplied instead of 1. In this way, the featured image partial can target only the relevant placements.

We also may need to dynamically add the partials rather than declare them statically, since the selector is going to change for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.