curlybracket
Forum Replies Created
-
Forum: Plugins
In reply to: [LearnPress - WordPress LMS Plugin] issue using learnpress with polylangso, funny thing: if in the polylang settings I do “The language is set from content” the lessons work. Before, my setting was ”?The language is set from the directory name in pretty permalinks” – but that doesn’t work on the “all courses” page which now shows all courses, regardless of language…
Forum: Plugins
In reply to: [LearnPress - WordPress LMS Plugin] issue using learnpress with polylangI have exactly the same issue – but what’s worst is that it used to work.
Correct. Some days ago I apparently deleted the temporary folder needed by PHP to upload images and also used apparently by Mailpoet, or rather by admin-ajax.php of WordPress.
I found it helpful to find out which temporary folder is to be used by PHP:
<?php echo "\nTemp directory: ", sys_get_temp_dir(), "\n"; ?>
I got:
Temp directory: /var/www/virtual/mydomain.org/phptmp
So I created that folder on the server (htdocs is some sort of alias to the longer path above):
mkdir /htdocs/phptemp chmod 755 /htdocs/phptemp
(You can also do that using an S/FTP program with a GUI.)
I guess that can be modified using a php.ini file, but I went with this not create more havoc. I’m writing this here in case anyone experiences something similar and cannot seem to fix it using the instructions provided (because they are, in fact, incomplete).
Anyway, everything works again now. It had literally nothing to do with browser cache and that error message is a bit misleading.
- This reply was modified 2 years, 6 months ago by curlybracket.
- This reply was modified 2 years, 6 months ago by curlybracket.
Ok, I think this might be related to a missing folder for temporary files on the server. Will confirm in a bit.
Forum: Plugins
In reply to: [SMTP Mailer] Stopped working: does not send emailsOk, now this is funny. First of all, there seems to be a link with the multisite. On the first site, SMTP Mailer does not even manage to try to send a test email. There is no output. On the second site, I do get output. But interestingly, SMTP Mailer seems to try to send email using the address associated to my WP user, not the address that I entered into the fields:
2021-10-06 08:50:00 SMTP INBOUND: "235 2.7.0 Authentication successful" 2021-10-06 08:50:00 SERVER -> CLIENT: 235 2.7.0 Authentication successful 2021-10-06 08:50:00 CLIENT -> SERVER: MAIL FROM:<[email protected]> 2021-10-06 08:50:01 CLIENT -> SERVER: DATA 2021-10-06 08:50:01 SMTP INBOUND: "554 5.7.1 <DATA>: Data command rejected: Could not find envelope sender user [email protected]" 2021-10-06 08:50:01 SERVER -> CLIENT: 554 5.7.1 <DATA>: Data command rejected: Could not find envelope sender user [email protected] 2021-10-06 08:50:01 SMTP ERROR: DATA command failed: 554 5.7.1 <DATA>: Data command rejected: Could not find envelope sender user [email protected] SMTP Error: data not accepted.
[email protected] is the email address of my WP user… not the address that SMTP Mailer uses to successfully log in to the mail server…
hi @briantp,
yes I am using this plugin but it does not link to the next course. It only tells people about previous courses they have to finalize. My goal would be to add a link to the next course once a course if finished. And this could actually be cool for paid courses too: You finish a course and then you get a suggestion for the next course. Which would be something to engage learners with the site more.
Is there any hook in a template that I can use to create such a kind of link/pagination?
Thanks! That sounds great ??
Forum: Plugins
In reply to: [Polylang] Polylang dropdownHi Seb @kwyjibeuss,
happy it worked!
I think you could now mark this topic as being resolved ??Forum: Plugins
In reply to: [Polylang] Polylang dropdownHi! @kwyjibeuss,
sorry for not getting back to you earlier.
You need to add this code to a stylesheet.
You should be able to add additional CSS styles here: https://respire-aligne.com/wp-admin/customize.php → look at the bottom of the menu, there should be “Additional CSS” and there you can just copy paste that code I wrote above.
Or you can directly edit your theme’s stylesheet, although your question above suggests that you should ask a knowledgeable friend for help with that ??
Good luck!
For anyone looking into having a courses page with courses only in the language you defined using Polylang: Create a page template, make that page your start page (not the LP courses page).
<?php /* Template Name: Page All Courses */ get_header(); if( function_exists('pll_current_lang')): $current_lang = pll_current_lang(); endif; $args = array( 'post_type' => 'lp_course', 'post_status' => 'publish', 'numberposts' => 1, 'orderby' => 'title', 'order' => 'ASC', 'lang' => $current_lang, ); $query = new WP_Query($args); if ($query->have_posts()) : ?> <ul class="course-list"> <?php while ($query->have_posts()) : $query->the_post(); ?> <li <?php post_class(); ?>><div class="course-item"> <a href="<?php the_permalink(); ?>"> <?php if(has_post_thumbnail()): ?> <?php the_post_thumbnail('course_thumbnail'); ?> <?php endif; ?> <h3 class="course-title"><?php the_title(); ?></h3> </a> </div></li> <?php endwhile; ?> </ul> <?php endif; wp_reset_query(); get_footer();
The annoying part is to create a CSS that resembles a bit the one of LP. This is what I came up with, hope it helps:
ul.course-list { list-style: none; margin: 3rem !important; display: grid; grid-template-columns: 1fr; column-gap: 0.1em; row-gap: 0.2em; } @media (min-width: 700px) { ul.course-list { grid-template-columns: 1fr 1fr; } } @media (min-width: 1000px) { ul.course-list { grid-template-columns: 1fr 1fr 1fr 1fr; } } ul.course-list li { margin: 0 !important; } ul.course-list .course-item { background: #000; border: 1px solid #ddd; overflow: hidden; transition: all 0.3s; margin: 15px; } ul.course-list .course-item:hover { box-shadow: 0 5px 15px #ccc; } ul.course-list .course-item img { width: 100%; height: auto; transition: all 0.7s; } ul.course-list .course-item:hover img { transform: scale(1.2); opacity: 0.8; } ul.course-list h3.course-title { font-size: 15px; margin: 0; padding: 3rem 1em; background: #fff; position: relative; z-index: 2; bottom: 0; } ul.course-list a { text-decoration: none !important; } ul.course-list a h3.course-title { color: #000; } ul.course-list a:hover h3.course-title { color: var(--lp-primary-color); }
Forum: Plugins
In reply to: [Polylang] Polylang and Learnpress – issue with course pageI’m closing this post, I created a workaround over which I have more control ?? aka a page template that gets the courses list with nice code ??
Forum: Plugins
In reply to: [Polylang] Polylang dropdownThis is just a CSS issue not related to Polylang and you use a list dropdown, not a select:
.main-header-menu .sub-menu { border: none; background: transparent; } .ast-desktop .main-header-menu:not(#ast-hf-mobile-menu) .sub-menu { box-shadow: unset; }
Enjoy!
- This reply was modified 3 years, 6 months ago by curlybracket.
Forum: Plugins
In reply to: [Polylang] Polylang and Learnpress – issue with course pageMaybe related:
If, in functions.php, I try to alter the query of the LearnPress course page, like so:
add_action( 'pre_get_posts', 'lp_course_order_query', 15); function lp_course_order_query( $query ) { // code }
then it’s not possible to access the
pll_current_lang()
function. Is this function not yet available for pre_get_posts? I don’t know much about WP priorities and hook magic.Forum: Fixing WordPress
In reply to: Pictures disappeared from published postsUsing a code inspector I see that the images are still being loaded from another site:
https://i1.wp.com/www.anonymoussos.com/wp-content/uploads/2021/09/2356B483-6793-441A-AD07-1DEF6B6D1E08.jpeg
You see the
https://i1.wp.com/
part beforewww.anonymoussos.com/
?Seems you use a caching plugin: the source code of the home page says
Page generated by LiteSpeed Cache 4.4 on 2021-09-10 16:00:53
But it looks like the cache is from today, so this cannot be the issue.Did you really deactivate Jetpack’s option as described here: https://www.paulchinmoy.com/how-do-you-remove-i1-wp-com-from-your-image-url/ ? This issue seems related to the JetPack plugin.
- This reply was modified 3 years, 6 months ago by curlybracket.
- This reply was modified 3 years, 6 months ago by curlybracket.
- This reply was modified 3 years, 6 months ago by curlybracket.
Forum: Fixing WordPress
In reply to: Uncaught SyntaxError: Unexpected token ‘<'Looks like some Javascript files could not be downloaded or not be downloaded entirely because of error 503 = Service unavailable. Some issue at your hoster?