pluginandplay
Forum Replies Created
-
You have already provided this information previously but it is not helpful.
Kindly check the stored value in the database. You can find it postmeta table with reference to the post id.
Please let me know what exactly it is storing in the DB.
As you are saying the ACF custom date field return value is d-m-Y.
Actually return format is different than what actually stored in the database.
Kindly check the stored value in the database. You can find it postmeta table with reference to the post id.
Please let me know what exactly it is storing in the DB.
For your query,
01) The code you provided should be place in the functions.php file?
Ans – Yes.02) The time format we use is d-m-Y.
Ans – OK then you need to use the same format in the given code.03) We have a few shortcode(s) of the plugin slider on the same web page with different sorting and result set, will the code affect all of them and wondering how to target only one of the sliders on the same page without affecting the others?
Ans – Actually yes it will affect all the sliders. There is no direct provision in the lite version but you can apply a little tweak.[psac_post_slider category="4" orderby="custom-date"] /* This will bring the category post. You can enter category ID or Category Slug. You can pass multiple values as a comma separated */In the above shortcode make sure you pass orderby=”custom-date” so “custom-” will be the static string and after dash (-) you should pass the original order by value. In this way it will work for that slider only which has orderby=”custom-date”.
Please try this modified code https://pastebin.com/raw/KMEmnrPS
Thanks for your patience. I have prepared the code but I have few queries,
First of all you have to use the shortcode with category parameter i.e.
[psac_post_slider category="4"] /* This will bring the category post. You can enter category ID or Category Slug. You can pass multiple values as a comma separated */So Post Slider and Post Carousel plugin above shortcode will do the half work. Now we want to fetch result which has custom date >= today date.
Please use this source code https://pastebin.com/raw/BJ5QXAn6 and add it to your current theme / child theme functions.php file.
This will modify the post slider output.
Now my query is,
01) Does your meta key named
end_datestores only date or it stored date and time?
02) What is the format of storage? Is it Y-m-d?Based on this a code will be modified. Right now code is written by assuming that it stored the date in Y-m-d format in database.
Hello @elsoar
Sorry for the delay response.
Actually sticky post functionality is not available in the lite version.
Thanks for your response. No issue, I will help you with that.
Can you please tell me what exactly you want in WP Query?
I mean which type of Post you want to get. Is it specific custom field? So give me its meta key and value or is it specific category post you want to fetch?
Sorry for the delay response.
Yes, It is possible bur requires technical knowledge. Post Slider and Post Carousel plugin have WP Query filter which you can use and modify the query output as per your need.
For Slider query you can use the
apply_filters( 'psacp_post_slider_query_args', $args, $atts );And Carousel query you can use the
apply_filters( 'psacp_post_carousel_query_args', $args, $atts );I hope the above information will help you.
Sorry for the late reply.
Here is one method where you can manage this with custom CSS:
@media only screen and (max-width: 640px) {.bdp-column, .bdp-columns{width:50% !important;}}Right now we have 100% to columns if screen size < 640. With this custom css you can set this to 50%
You can add this CSS to WordPress Appearance > Customize > Custom CSS or in your theme / child theme style.css
Please try the above CSS and let me know if there is anything.
- This reply was modified 1 year, 4 months ago by pluginandplay.
Hi @manoj317
Thanks for your response. Yes, I saw the code but it will not work with the
content_words_limitparameter as you have removed it.No Issue, It will work as per your need at this moment. Right now there is no provision to modify the function or template but in future I will try to add the templating functionality so you can modify the plugin HTML by copying its file to your current theme.
Thanks for your response. Yes,
add_action( ‘pre_get_posts’, ‘my_change_sort_order’);is changing the order of Post Slider and Post Carousel plugin query.Your function will change query parameter for every archive page because of this condition
if(is_archive()):As per your response on Dec 08, 2024, In archive page you have a Post Slider and Post Carousel plugin shortcode and below it there is a WP Query which is fetching the record of particular category
a_categoryand query is orderby post_title in ASC.So the function in the functions.php is not necessary if you had placed for this archive page only. Is this function used for any other archive page?
If not then simply comment it and every thing will work normal.
Hi @manoj317
Thanks for the image. Yes, “Post Slider and Post Carousel” plugin only display the post content as text as brief / short content. It does not allow HTML in it because of the
content_words_limitshortcode parameter.There may be a chance that HTML could be incomplete with respect to
content_words_limitand it can break the slider functionality.I appreciate your feedback and try to implement in future version with some work around.
- This reply was modified 1 year, 4 months ago by pluginandplay.
Thanks for the code. The first part is “Post Slider and Post Carousel” which has orderby random and second part is another query (Query 2) which has orderby post title.
Both are individual query and works independently. Have you tried another orderby parameter in Post Slider and Post Carousel shortcode just to understand only orderby random is not working or others are also?
Some hosting disable the orderby random due to performance issue and sometime third party plugin interrupt the WP Query also by hooks.
Sorry for the delayed response. No should not affect. Both queries are independent and it will work independently.
Can you give me your web page URL? So I can take a look and try to understand the scenario. One more thing to confirm as per your response, Order By is not working in your Gallery plugin or in Post Slider and Post Carousel Plugin.
Hi @motk88
Thanks for your message. Actually “random order” functionality is not available in the lite version.
Sorry but I am not asking about the WP Query in archive.php file actually I am saying that
Can you please tell me which hosting you are using? Because some hosting companies disable the order by random.
Is there any third party plugin active which can modify the WP Query behavior via Hook or Filter?
Also one more thing, Its only orderby=”rand” or none of the orderby parameters is working.