markdimi
Forum Replies Created
-
Forum: Plugins
In reply to: [Pods - Custom Content Types and Fields] Save a pod with a yes/no fieldTurns out I had an error in the name of the variable. Passing 1 or 0 as strings works as a charm.
Yes, it was a permissions problem, for some unclear reason. Even though I made a Pod in the same installation and had no problems. Maybe this happens only with migrated content?
Anyway, I used a plugin for adding the pods capabilities to the users I wanted, but also by using the component
Roles & Capabilities
you might get the same result.Forum: Themes and Templates
In reply to: [Eksell] Change the post order in the archive viewSolved without overriding the archive template.
Add the following snippet in the
functions.php
.add_action( 'pre_get_posts', 'new_sort_order'); function new_sort_order($query){ if(is_archive() && is_post_type_archive( "post_type" )): //Set the order ASC or DESC $query->set( 'order', 'ASC' ); //Set the orderby $query->set( 'orderby', 'title' ); endif; };
If you want to change the order to all the posts just remove
is_post_type_archive
from theif
statement.Forum: Themes and Templates
In reply to: [Eksell] Change the post order in the archive viewHello.
Well from what I gathered the archive uses a WP_Query object which has a setting for ordering. Isn’t there a way to externally manipulate query setting and change the order?
Or is there a way to override the archive all together, create an archive page for the post type and rewrite the WP_Query object?
Forum: Themes and Templates
In reply to: [Eksell] Duplicate posts in the Archive pageSo, good news! I found the problem. It wasn’t any of the plugins or the child-theme.
Since I created all the posts via an automation (either with a plugin or using an importer) lots of the posts shared the same date.
So by changing the date to all the posts to different ones I think I solved the problem.
The date was the only thing that the posts had in common and it had to play a role to the buggy behavior. And I think it did.
Forum: Themes and Templates
In reply to: [Eksell] Display filters for custom post type archive page?It turns out that
eksell_show_home_filter()
isfalse
for my archive page so by remove the line below frommarkdimi_the_archive_filter_clients
:// Check if we're showing the filter if ( ! eksell_show_home_filter() ) return;
I get the filters.
As for the
eksell_show_home_filter()
beingfalse
I can’t tell why that is. I have the setting to show filters on and I also added in theinc/template-tags.php
the CPT where I want to show filters:if ( ! function_exists( 'eksell_show_home_filter' ) ) : function eksell_show_home_filter() { $paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : ( get_query_var( 'page' ) ? get_query_var( 'page' ) : 1 ); return apply_filters( 'eksell_show_home_filter', ( is_home() || is_page_template( 'page-templates/template-portfolio.php' ) || is_post_type_archive( 'works' ) || is_post_type_archive( 'jetpack-portfolio' ) ) && $paged == 1 && get_theme_mod( 'eksell_show_home_filter', true ) ); } endif;
Forum: Themes and Templates
In reply to: [Eksell] Display filters for custom post type archive page?First of all I appreciate your immediate and detailed response. I am greatly thankful!
My approach was different, since I was trying to create a template archive file where the filters would be shown. However, I tried your solution and I think our scenarios might be slightly different.
I also want to show filters on a
works
CPT and I am also using the default taxonomies.However in the archive page I am not getting any filters. Just an archive with a title on the top and all the work posts. I am also not using the archive page as a landing page, like the default Eksell implementation. Long story short I used all the code snippets you gave me (after changing the name of the CPT to
works
) and I am not getting any filters back.So, could I ask you how you created the CPT and how you created the archive for it? Did you use an archive template? I created the CPT with the CPT UI plugin and I used the option for it to have an archive.
Thanks again!
- This reply was modified 3 years, 1 month ago by markdimi.
Forum: Themes and Templates
In reply to: [Eksell] Display filters for custom post type archive page?I am trying to implement the same idea. Can you share any tips @julianoe ?
So I investigated a little more and you were right. There was a js file in my theme that was loading owl carousel and some settings.
Since I don’t own the theme, somebody else wrote it and I don’t know where he is using owlCarousel, I just don’t load that script in the area I want to show my carousel and it worked.
Many thanks for your assistance and your work for the community! Cheeers
- This reply was modified 5 years, 1 month ago by markdimi.
Hey thanks for getting back at me.
I did try the “DOMContentLoaded event” checkbox – under “Other Settings” and the result was the same (jQuery is the first js library that is loaded).
I created a page template file that loads the slider and only the header and the footer. No page builder.
https://www.lefkipposbc.gr/slidertester/
The result is the same.