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
- Create side bar widget showing list of years as hyperlinks for a custom post type
- Custom Post Type posts not getting picked up in archive widgets
- How to get taxonomy category in permalink for each taxonomy OR How to give a parent page to a given taxonomy?
- Using a custom widget to add data from a custom post type into the sidebar
- Get the first post term
- Add Category Taxonomy Support to Custom Post Type
- Disable permalink on custom post type
- Registering custom taxonomy with unique name, a good practise?
- custom post type and custom taxonomy permalink
- When we register a custom taxonomy or post type, does the WP database modified at all?
- Post Type only showing for “Admin” under “Appearance” > “Menus”
- How do I create multiple post types in same menu section in WP-admin?
- Query for posts from any post type but only add instock products
- WP insert post PHP function dynamically generated Custom Fields
- Query not returning CPT posts
- Change Post Title Edit Box
- Unable to display multiple post types in same query (WPML WP_Query)
- Parent a CPT to a page
- Disable feeds for specific custom post types
- After deleting a post are terms, and custom meta deleted?
- How to use custom post type APIs, but use a different db table
- 1 day after custom date change post status to draft
- Unable to get paginate_links working with a custom query [duplicate]
- Different permalink for CPT and regular Posts/Pages but why?
- Help need making decision. Ads rotating site on wordpress
- Categories of custom taxonomy don’t show any posts
- Can a Custom Taxonomy be named “category” like normal Posts?
- How to use terms from the same custom taxonomy in different roles in a custom post type?
- Able to edit custom post, but unable to create new custom post when within submenu. What capability is missing?
- Shortcode to display Staff post type based on Location post type and Specialty post type
- Foreach inside shortcode not working as planned