Forum Replies Created
-
AuthorPosts
-
February 3, 2023 at 3:29 pm in reply to: Delay in visualizing image positioned absolute over Fullscreen Slider #1396549
Hi Ismael, by the way in the the same website where I created my test page for you, I encounter the same issue when I added to the pages an opening “fullscreen slider” with the column positioned -30% margin top (you can check any page of the website). The column with title and text appears overlapped to the slider only when starting scroll the page.
That’s kind of weird
February 2, 2023 at 9:42 am in reply to: Delay in visualizing image positioned absolute over Fullscreen Slider #1396351Hey Ismael, it is on a local machine because I am starting to develop it. However I reproduced the page on a site that I just published, so you can have a look. I post it on the private link
-
This reply was modified 2 years, 1 month ago by
elenapoliti.
This last post is to close the topic. I have found the solution and it was only a matter of understanding how it was named the taxonomy for the portfolio entries. Easy question. However the working code is here below.
Explanation: when on a single portfolio entry, it shows number of single post and total number of posts within one category)add_shortcode('post-counter', 'get_current_post_num'); function get_current_post_num() { $url = $_SERVER['REQUEST_URI']; $curr_post_id = url_to_postid( "https://sharkrayareas.org".$url ); //Too early for $post object $taxonomy = 'portfolio_entries'; $term_objs = get_the_terms( $curr_post_id->ID, $taxonomy ); foreach ($term_objs as $term_obj) $term_ids = $term_obj->term_id; // get the id from the WP_Term object $args = array( 'post_type' => 'portfolio', 'post_status' => 'publish', 'tax_query' => array( array( 'taxonomy' => 'portfolio_entries', 'terms' => $term_ids, ), ), 'order'=> 'ASC', 'posts_per_page' => -1 ); $portfolio_posts = new WP_Query($args); if ($portfolio_posts->have_posts()): echo 'true'; $total_posts = $portfolio_posts->found_posts; $num = 1; while ($portfolio_posts->have_posts()) : $portfolio_posts->the_post(); $post_id = get_the_ID(); if ($post_id === $curr_post_id) { $output= '<div class="count">'. $num . '/' . $total_posts .'</div>'; } else { $num++; } endwhile; endif; return $output; }
Hi Mike, actually I am not interested in hiring somebody for this thing on Upwork.com. I am getting some inputs through Stackoverflow and here what I found.
The code above I was trying to use to get the category was obviously wrong. The right code should be this:$categories = get_the_category( $post_id->ID);
So with my data it should come out as follows
function get_current_post_num() { $url = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; $curr_post_id = url_to_postid( "https://".$url ) $categories = get_the_category( $curr_post_id->ID); //etc etc
The problem is that in the portfolio item the array returned is 0, while the same exact code applied to a blog single post returns an array with all the terms (hence the categories applied).
So I come back to my previous question: how are the portfolio categories treated??? How can I access them? This is a question that should pertain to the Enfold support I believe.
Thank you very much
-
This reply was modified 2 years, 2 months ago by
elenapoliti.
Thanks Mike for your answer. The code above works as I said and you can see it on three test portfolio items at the link in private area. I can see how to add ob_start() and ob_end_clean()
So you think there is no possibility of obtaining a category if I know the post_ID? because from WP documentation it seems that it is possible. What I don’t understand is if Portfolio categories should be handled as categories or taxonomy (sorry for my ignorance in WP)
Thanks
-
This reply was modified 2 years, 2 months ago by
elenapoliti.
January 16, 2023 at 1:48 pm in reply to: Create shortcode for post navigation left/right arrows portfolio entries #1378870Thanks for your answer Mile, yes you can close the ticket
January 16, 2023 at 11:45 am in reply to: Create shortcode for post navigation left/right arrows portfolio entries #1378832Thanks Mike, your solution works nicely. Yes the number of posts is something the client wanted but I see it a little bit hard. The problem is that I am using portfolio pages to show these forms, that have different categories. So the total number of posts actually shown should be the total within a certain category. I am not sure I could make it.
January 13, 2023 at 11:22 am in reply to: Create shortcode for post navigation left/right arrows portfolio entries #1378559Hi, concerning the above topic do you have a suggestion? Thanks in advance
Thanks Rikard, you can close the topic
Oh gosh you are right!! I am so stupid. I gave you the access to the wrong website (I was having a trouble on a new website). But your answer made me find the solution (which was already implemented in the website you logged in), which is the following function
add_filter('avf_builder_boxes', 'add_builder_to_posttype'); function add_builder_to_posttype($metabox) { foreach($metabox as &$meta) { if($meta['id'] == 'avia_builder' || $meta['id'] == 'layout') { $meta['page'][] = 'wpdmpro'; /*instead add the name of the custom post type here*/ } } return $metabox; }
Thank you very much and sorry for bothering!
Hi Nikko, I add the link in the private section. The package pages are treated as a blog actually. I would like to find a way(in case by adding a hook to the functions.php) to add a custom sidebar for these kind of posts, which includes whatever I want (e.g. categories of the WPDM packages or else, instead of the blog posts categories)
thanks
April 1, 2022 at 10:54 am in reply to: Fullwidth easy slider not full width in WPML translated pages #1346833Thanks Günter for the quick reply! In the meanwhile WPML people suggested the following workaround that I have to test
Replace the following line (wp-content\themes\enfold\config-wpml\config.php – LINE 794)add_action( 'wpml_pro_translation_completed', 'avia_wpml_sync_avia_layout_builder_meta', 10, 3 );
With this:
add_action( 'wpml_pro_translation_completed', 'avia_wpml_sync_avia_layout_builder_meta', 1000, 3 );
March 31, 2022 at 9:19 am in reply to: Fullwidth easy slider not full width in WPML translated pages #1346712Ismael I am worried that the topic will not be solved. Look at the answer I have received from WPML https://wpml.org/forums/topic/enfold-fullwith-slider-widget-changes-layout-on-new-posts/page/3/#post-10915587
March 24, 2022 at 5:44 pm in reply to: Fullwidth easy slider not full width in WPML translated pages #1345900ok thanks
March 23, 2022 at 6:45 pm in reply to: Fullwidth easy slider not full width in WPML translated pages #1345734March 1, 2022 at 10:12 am in reply to: Fullwidth easy slider not full width in WPML translated pages #1342676Thanks Ismael. I am afraid it must be some incompatibility between the new versions of Enfold and WPML. I will go on updating the pages manually while waiting for some updates
February 28, 2022 at 2:11 pm in reply to: Fullwidth easy slider not full width in WPML translated pages #1342562Hi Ismael I still have the same problem. In parallel I am checking this out with WPML guys who still didn’t figure it out. We tested on a new brand wordpress installation and the same issue came out. Could you be of help?
Here the link to the video I made showing my workflow, just for your informationFebruary 25, 2022 at 5:37 pm in reply to: Fullwidth easy slider not full width in WPML translated pages #1342309By the way Ismael I tried one more thing: I had a copy of the website on my local desktop without WPML. I installed the WPML and set it up in a basic way (I didn’t set translation for the acf fields yet) and simply translated the home page. The translated version presented a sidebar, exactly in the same manner it happened on the test sandbox made with the guys from WPML.
As you say, the issue doesn’t appear if I translate manually the page from within the Layout Builder. However other issues appear, such as the settings of columns (margins/padding etc) are completely messed up in all languagesThis seems to be a sort of conflict between Enfold and WPML. Which is strange as I use WPML in other websites built with Enfold and never faced this problem. I urgently need some help because I have to finish this work. Thanks
-
This reply was modified 3 years, 1 month ago by
elenapoliti.
February 25, 2022 at 10:47 am in reply to: Fullwidth easy slider not full width in WPML translated pages #1342254February 24, 2022 at 11:49 am in reply to: Fullwidth easy slider not full width in WPML translated pages #1342138Hi Rikard, you can check to this page and its translation https://www.yourapartmentinvenice.com/apartment/ca-frezzeria/
You will need the login details in private, since right now the site is on maintenance modeJanuary 14, 2022 at 4:42 pm in reply to: Change standard enfold mobile menu behaviour with a total custom code #1335607Thanks for the information
January 13, 2022 at 10:19 am in reply to: Change standard enfold mobile menu behaviour with a total custom code #1335375Thanks, I just needed to know if that is feasible: I can try to implement it. Please, if it is possible for you, could you tell me if to avoid Enfold loads its own mobile menu I can just add this to my functions.php
function avia_append_burger_menu() {
return “”;
}And then append my own custom menu?
Thanks
Yes now that part seems working. However, if you scroll down you see a series of people’s pictures. By clicking on each of them you should go to the team page at the anchor for each one. That still doesn’t work. While if I am on team page, the left sub-menu with anchors works fine.
Thanks
Sorry, try again now with the same credentials
May 24, 2021 at 3:47 pm in reply to: Add a fullwidth submenu in single portfolio with hooks #1302038Fantastic Yigit, it worked perfectly! You can close the ticket and thanks very much
Well actually @Guenni0007 it was not that I didn’t believe you! I just didn’t realize from your advice that the problem was actually in the file functions.php. My stupidity!
Yes you are right. I just passed the while functions.php that is online. I did deregistered some scripts for that page and as a mistake (it was only on the file online) also the popup.js script!
That was causing the problem. Sorry really for having disturbed you (and @Guenni007 too) for such a stupid mistake. That page has such complex scripts on different files that I usually use 2 different copies (one for the server and one for the local tests), and I didn’t catch the error at first.
You can close the ticket, thank you very much
-
This reply was modified 3 years, 10 months ago by
elenapoliti.
Thank you very much to both @Guenni007 and @Rikard.I add in the private section the access to the admin wp. This is the page in question (https://www.marinemammalhabitat.org/imma-eatlas/) and the popup should be triggered by clicking on the link “definitions” at the right bottom of the page
Thanks for the time you spent on the issue. I hope that somebody from Kriesi may help
So should I use some other solution to create a popup? Maybe just a simple jquery to write directly into the template..
-
This reply was modified 3 years, 11 months ago by
elenapoliti.
-
This reply was modified 2 years, 1 month ago by
-
AuthorPosts