Hello,
I was wondering if I could make a widget area below featured posts and above new (regular) posts, similar to one shown in a previous thread. I would like to style it so that it looks like a regular post (white background, black border).
Here is the link to the previous forum thread: https://theme.co/apex/forums/topic/adding-new-widget-area-to-child-theme/
Thanks in advance.
Hello There,
Assuming that the child theme is set up, please add the following code in your child theme’s functions.php file
// Widget above the posts
// =============================================================================
function add_widget_in_archive() {
if ( is_home() || is_archive() ) {
dynamic_sidebar( 'ups-sidebar-my-sidebar' );
}
}
add_filter('x_before_view_global__index', 'add_widget_in_archive');
// =============================================================================
Please make sure that you inserted the correct sidebar ID in the code above.
We would love to know if this works out for you.
Looks great!
Though, would it be possible to have it positioned below featured (stickied) posts and above regular posts?
Thank you so much!
EDIT: Text widget I am using looks different from before. Is there a way to fix this?
Once again, thank you.
Hello There,
WordPress generates the sticky post first then the normal post items. Inserting any custom contents between the sticky post and the normal post item may be possible with custom development. Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. We do have an in-house custom development team that offer paid services, who may be able to assist. They can be contacted at [email protected] if this is of interest to you. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.
Thank you for your understanding.
Ah, okay, but could you help me style the text widget to how it was before in the post?
The formatting became weird once I converted it to a text widget.
Hey There,
Hope you are doing great 
Add the following CSS code global CSS section in theme options.
.entry-content {
margin-top: 0.25em;
}
Let us know how it goes.
Regards
I think there was a misunderstanding.
I am talking about the actual text widget itself. It’s not formatting the same as when it was a post.
There are additional elements for some reason.
Please add this custom CSS
.x-recent-posts p:first-child, .x-recent-posts > p {
display: none;
}
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.