Can I modify the widget output?
Yes, filters are available for each section’s output:
sixtenpressfeaturedcontent_query_args
sixtenpressfeaturedcontent_image_source
sixtenpressfeaturedcontent_image_link
sixtenpressfeaturedcontent_image
sixtenpressfeaturedcontent_title_text
sixtenpressfeaturedcontent_entry_meta
sixtenpressfeaturedcontent_entry_content
sixtenpressfeaturedcontent_extra_title
sixtenpressfeaturedcontent_term_link
sixtenpressfeaturedcontent_archive_link
Each filter includes: 1) the element to modify; 2) the current widget $instance; and 3) the current widget context, or $args.
Can I set a custom order on posts/content in the widget?
Yes. Get the ID numbers for each post you want to include in the widget. Enter them, in your desired order, in the “Post/Page IDs to Include/Exclude” input, separated by commas. Make sure you’ve selected “Include” for the “Include/Exclude Specific Posts” dropdown. Select “Custom Order” for the order of the posts in the widget.
Can I add the featured image to the unordered list of more posts from this category?
Yes, now you can, by using a filter. Example:
add_filter( 'sixtenpressfeaturedcontent_extra_title', 'prefix_add_thumbs_extra_posts', 10, 2 ); function prefix_add_thumbs_extra_posts( $extra_title ) { $image = get_the_post_thumbnail( get_the_ID(), 'thumbnail', array( 'class' => 'alignleft', 'alt' => the_title_attribute( 'echo=0' ) ) ); return $image . $extra_title; }
Why does my “read more” link also include “about”, followed by the post title?
This is a span added by the plugin to make the link comprehensible to users using screen readers and other assistive devices. If your theme includes styling for `screen-reader-text`, this span will not show. If you’re seeing the text, then your theme doesn’t include this. You can either add appropriate CSS, or you can go to Settings > 6/10 Press Featured Content and enable the plugin stylesheet, which does support `screen-reader-text` styling.
Can I add schema markup to my posts?
Yes, you can! If you’re familiar with how the Genesis Framework allows you to add schema attributes to your markup, 6/10 Press Featured Content works the same way. So, if you’re already using the following to add schema markup to your entries:
add_filter( 'genesis_attr_entry', 'prefix_custom_post_markup', 20 ); function prefix_custom_post_markup( $attributes ) { $attributes['itemscope'] = true; $attributes['itemtype'] = 'http://schema.org/BlogPosting'; if ( ! is_search() ) { $attributes['itemprop'] = 'blogPost'; } return $attributes; }
Then you can use one line of code to add the same schema to your widgets:
add_filter( 'sixtenpressfeaturedcontent_attr_entry', 'prefix_custom_post_markup' );
Since you’ve already done the work in the original function, you don’t need to write it again; just call it for 6/10 Press Featured Content. Available filters include:
sixtenpressfeaturedcontent_attr_entry
sixtenpressfeaturedcontent_attr_entry-image
sixtenpressfeaturedcontent_attr_entry-content
sixtenpressfeaturedcontent_attr_extra-posts-title
If you are using the Genesis Framework, use the genesis_attr_{$context}
filters for entry meta (the plugin defers to Genesis’ shortcodes). Otherwise, entry meta filters include:
sixtenpressfeaturedcontent_attr_entry-time
sixtenpressfeaturedcontent_attr_entry-author
sixtenpressfeaturedcontent_attr_entry-author-link
sixtenpressfeaturedcontent_attr_entry-author-name
Can I disable the link for the featured image in the widget?
Sure! You can disable it on every widget everywhere with this:
add_filter( 'sixtenpressfeaturedcontent_image_link', '__return_false' );
Or you can create a function to apply it conditionally.
Return to Six/Ten Press Featured Content