YMC
Forum Replies Created
-
Hi!
Regarding the first point, horizontal filter alignment only applies to the Default filter type. Other filter types need to be custom-styled to match your design. This can be done in the Advanced – Custom CSS section or in your custom link file. Regarding color management, please let me know what exactly isn’t working for your filters (please provide more detailed information on this point).
Then, regarding post sorting, you can set a meta key in the Appearance – Post Settings – Post Order By section and then select the desired option (see screenshot https://prnt.sc/SlrdKMOj3VJk).
Or, a better solution to this task is to use callback functions for the request. But this is a more complex implementation. See the documentation https://github.com/YMC-22/YMC-Filter#advanced-developer-hooksWe hope this helps.
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutGood Luck!
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutHi!
You can get the post ID within the shortcode itself. See example:add_shortcode( 'test_sc', function($atts) {
$atts = shortcode_atts( array(
'post_id' => get_the_ID(),
), $atts );
$post_id = intval($atts['post_id']);
return '<div>
The test shortcode works successfully! Post ID: '. $post_id .'
</div>';
});Then in the builder, insert the shortcode names (see screenshot)
https://prnt.sc/wz6oQqBto-4b
Thus, inside the shortcode you have the opportunity to get the post ID and make some calculations) We hope this helps you!Forum: Plugins
In reply to: [YMC Filter] Working with WPMLHi!
We will forward your recommendations and suggestions to technical support. Thanks.Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutIf you use a DataPicker field in ACF attached to a post, you can display this field in the post card using a component called Custom Field (ACF) (see screenshot). The plugin already supports these field types, and this one displays perfectly on the frontend in the post card itself. We think this is what you meant.
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutTo get the ID of a page or post in functions.php, use the global $post variable (within the context), the get_queried_object_id() function (most reliable), or get_the_ID() (if used inside a loop).
The main ways to get the ID are: get_queried_object_id(): A universal method that works in templates, archives, and single pages, returning the ID of the current request. $post->ID: Requires explicit declaration of global $post; before use. url_to_postid(): Allows you to get the ID based on the URL, if known.
Getting the ID of the current page/post (universal):function get_current_page_id() {$id = get_queried_object_id(); return $id; } add_action('wp_head', 'get_current_page_id');
ORfunction check_post_id() { global $post; if ( is_single() || is_page() ) {echo $post->ID; } }add_action('wp_head', 'check_post_id');Using get_the_ID() (only inside the WordPress loop):
// If the code is called when generating content
$current_id = get_the_ID();It is better to use get_queried_object_id() or the global $post variable.
Forum: Plugins
In reply to: [YMC Filter] Custom fields in YMC Smart FilterHi!
You can use the Structural Builder to create post cards (see screenshot)
https://prnt.sc/b8xCwFZr2LE-
This usually solves 90% of all tasks related to filling a post card with the necessary components.
https://prnt.sc/_im6XbTllg6l
https://prnt.sc/fbH58gDpGsJ0
We hope this helps!Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutYou mean getting dates from ACF and then inserting them into the post card, right? If so, it’s probably better to process them using a shortcode (format the desired date) and then insert the shortcode into the post card. There’s a Shortcode component that inserts and displays the data.
Forum: Plugins
In reply to: [YMC Filter] Get ACF field in Structural builder custom layoutHi!
Of course, you can get the ACF field values within Structural Builder. To do this, select the Start from Scratch tab in the settings. In the list of elements, look for a component named Custom Field (ACF). Then, select your custom field from the list.Forum: Plugins
In reply to: [YMC Filter] Cant export Filter SettingsGood Luck!
Forum: Plugins
In reply to: [YMC Filter] Cant export Filter SettingsThat’s very strange. There are no errors in your console. Perhaps some other plugins are conflicting with ours. We’ll need to test that!
Forum: Plugins
In reply to: [YMC Filter] Cant export Filter SettingsThe thing is, when you click the button, the generated JSON file automatically starts downloading, and the browser downloads it to the folder configured on your computer. If nothing happens when you click the button, there may be a JavaScript conflict with other applications on your site. You need to check the console for any errors. To do this, press F12 and check for errors in the Console section. Provide us with a screenshot.
Forum: Plugins
In reply to: [YMC Filter] Place search field inline with taxonomy filtersGood Luck!
Forum: Plugins
In reply to: [YMC Filter] Cant export Filter SettingsHi!
Could you please clarify what exactly isn’t working for you when you click the Export As JSON button? We need more detailed information about your issue. Please send screenshots of your interface.
Forum: Plugins
In reply to: [YMC Filter] Place search field inline with taxonomy filtersHi!
Here’s a small section of CSS styles that will allow the search field to be positioned on the same level as the dropdown filter types. Paste this code directly into the Advanced – Custom CSS section.
We hope this helps you solve your task.#ymc-filter-1 .filter-section--top {
display: flex;
align-items: center;
margin-left: 350px;
}
.filter-posts-search {
position: absolute;
width: 330px;
inset: 0;
}Here is screenshots: