Since it sounds like you’re trying to do this without code I would do it this way: Create an ‘Advertisement’ post type which supports categories. Then use a ‘Related Posts’ widget that allows you to select custom post types as well as related categories.
Possibly one of these And use the widget settings to call the appropriate Ad
UPDATE: Not sure how clear my answer is but to use your example – you have a blog post in the category ‘dairy’ in your sidebar you use the ‘Related Posts’ widget to display posts of type ‘Advertisement’ in the category of the current post. Obviously, set up your Advertisement posts in the appropriate categories.
Related Posts:
- Where to put my code: plugin or functions.php?
- Custom Post Type Data in Sidebar widgets?
- Including Custom Post Types in “Recent Posts” Widget
- Limit widget to a specific registered sidebar
- is_singular() not working if called via callback function of admin-ajax.php
- Prepend regular Posts with custom slug, without affecting Custom Post Types?
- Include custom post types in categories widget
- Including a custom post type in the Archives widget
- Custom post-type in root directory, blog posts in subdirectory
- How to embed form data within the ‘Add new post’
- How to stop subdirectory wordpress install adding head elemets to entire site?
- Add custom post types stats to a custom dashboard widget
- How to create another version of the Category widget?
- ‘Pages’ widget alternative for custom post types?
- Including Custom Post Type posts in a page template contextually (or should I widget?)
- How to post twitter like updates on wordpress
- Blog page showing same content as homepage
- right_now_content_table_end function not working?
- Custom Post Type Loop throws 500 error when used in widget
- Custom page sidebar using Template dropdown box
- Random image from tag/custom type on sidebar
- Register widget only page is a singular of custom post type
- Widget: Custom Post Type Post Listing Dropdown on Admin Side
- Display Custom Toxonomy In WordPress and theme Widgets category selection dropdown list
- Custom Widget WP_Query problem
- Hide a widget inside a div on specific type of post
- Filter widget outputs
- Set Custom Post Type in Widget Settings for use in Widget
- Want to be able to sign up subscribers as authors
- the_post_thumbnail call removing li in code
- how to set a WP Plugin’s url
- Why isn’t a list of posts from my custom post type displaying in this widget?
- Display Only Certain Category In a Custom Page Template
- Exclude Custom post type from /blog page
- How to get dropdown instance value in WordPress custom Widget
- Post Query not working
- Methods for development wordpress themes [closed]
- Best way to change the blog page post type?
- display custom post type in widget aera
- Truncate custom post type content
- How to exclude categories from a sidebar with active widgets in it?
- Show only Current category and sub category of custom post wordpress
- Replace Content of Sidebar on Custom Post Type
- Custom Page Template – Widgets of wrong sidebar
- Add Pagination in custom Blog page template
- Post display in separate page [duplicate]
- Widget area for individual posts (custom post type)?
- How do I get the posts from single page custom post type from a sidebar to display in a page?
- I want to link an author to everything from any post type that they publish on the website
- retrieve custom post image through widget
- Custom post type not being pulled in widget
- Custom post types archive
- Excert ( the_excerpt(); ) Not working properly
- multiple custom post type category selection search
- how to override menu widget?
- Displaying database table in backend of wordpress
- Filter CPT based on meta box value using Flexible Posts widget?
- Creating Multiple Admin Widget Page with Calling One Sidebar
- fetch meta fields inside a widget
- Permalink for regular posts “/blog/”
- Radom post image/link based on custom taxonomy
- empty dashboard for custom role
- Code in custom widget queries all posts, when it should only query the current post
- How to add post type in masonry posts elementory widget
- Add /blog to the “post” post type url
- Post_type doesn’t work for widgets?
- How to display custom message for (Genesis) featured posts if no posts
- Wp-theme Development
- Custom post type disappeared in wordpress when I transferred theme to Showit
- Programmatically publish a post (custom post type) with custom fields
- Ordering Posts List By Taxonomy Terms?
- Change slug of registered custom post type in child theme
- Creating a gallery custom post type?
- Custom post type archive with dynamic taxonomy filtering – is it possible
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Adding menu_order to CPT admin page
- reference the current category being used in the category.php page
- Retrieve value of a category’s custom field
- How to integrate video slide using custom post types?
- Ascending Order is not Working in Custom Post Type Listining
- How can i display movies in profile page, added by an user?
- attach CPT data to a taxonomy
- ajax response not recieving
- How to build a WordPress post review system beside commenting
- Creating a non-hierarchical Taxonomy that behaves like categories
- Custom Post Type with Configurable Sidebar via ACF
- How to get xml file for a single post type?
- Single parent post lists child posts with pagination
- Custom Post Type, Custom Taxonomy Template: How to get current taxonomy name?
- Custom post category name showing empty
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Not saving custom taxonomy while using ajax
- Show a custom post title in another custom post type in Meta box
- remove duplicate name submenu link from the custom post type
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Convert category to custom post type
- Show custom post type under last posts configuration
- Optimise custom post type queries
- delete custom post type using a submit form
- Problem with custom post type search