I am using the PRO version of the NicheAddons Restaurant plugin and trying to set up the tab menu to display different categories of my menu (main courses, desserts, beverages, etc.). However, I am experiencing the following issues:
[narestaurant_elementor_template id="XXX"]
is only shown as plain text on the page.echo do_shortcode('[narestaurant_elementor_template id="XXX"]');
→ still no output.Is there a known fix for this issue, or will there be an update to resolve it?
i use version 1.6.3
Thanks for your support!
Best regards,
Michael
This lets the Redirection plugin continue handling uncaught (i.e. external) redirects AND live-fixes things at render-time (which is horrible if you’re not caching, but then again, what kind of animal are you if you’re not caching to some degree? LOL)
function replace_old_links_in_content($content) {
// Ensure Redirection plugin is active; if not, BAIL EARLY
if (!is_plugin_active('redirection/redirection.php')) {
return $content;
}
// FOR DEBUGGING, if you need it:
// Define allowed post types and specific post IDs (set to null to apply to all)
$allowed_cpts = []; // Change to post types you want; [] = all/any; ['post'] = only posts
$allowed_post_id = []; // Change to specific post IDs for testing; [] = all/any; [1,2] = only post ID 1 and 2
// END DEBUGGING
// Get the current post object
global $post;
if (!$post) {
return $content;
}
// Check if the current post matches the CPTs or the allowed post ID
if (!empty($allowed_cpts) && !in_array($post->post_type, $allowed_cpts)) {
return $content;
}
if (!empty($allowed_post_ids) && !in_array($post->ID, (array) $allowed_post_ids)) {
return $content;
}
// @TODO I know I shouldn't do this so teach me the right way for this plugin
global $wpdb;
$redirects = $wpdb->get_results("SELECT url as source, action_data as target FROM {$wpdb->prefix}redirection_items WHERE action_type='url' and match_type='url'");
if ($redirects) {
foreach ($redirects as $redirect) {
// @TODO this all needs to be rewritten to take all the pattern matching into consideration (or use the API). I told you this is a dirty snippet.
//
$old_path = trim($redirect->source, "/"); // Remove leading/trailing slashes
$new_url = esc_url($redirect->target);
// Generate the full site URL dynamically
$site_url = home_url("/{$old_path}/");
// Create regex to match all possible variations of the old URL
$pattern = '~https?://(www\.)?' . preg_quote(parse_url($site_url, PHP_URL_HOST) . parse_url($site_url, PHP_URL_PATH), '~') . '?(/)?~i';
// Perform regex replacement
$content = preg_replace($pattern, $new_url, $content);
}
}
return $content;
}
add_filter('the_content', 'replace_old_links_in_content', 20);
Implementation:
Known Flaws:
I am writing regarding Add-ons plugin. When a customer selects all previous attributes, xadd-on radio button disappears and cannot be brought back. Is this standard practice, or is something not working correctly? You can see the issue on the website?https://even-star.com/product/bunkica-za-hisnega-ljubljencka/.
I look forward to your response.
Best regards,
Ajda
Some examples:
Dashboard
– ‘Create a New Course’ button
– Mijn pakketten > ‘My bundles’ title (Should be ‘Mijn pakketten’)
-> ‘Publish’, ‘Pending’ and ‘Draft’ tabs (Should be ‘Publiceren, ‘In behandeling’, ‘Concept’)
-> ‘Price’ in the bundle card (Should be ‘Prijs’
– ‘Analytics’ (Should be ‘Rapportages’)
-> ‘Overview’ (‘Overzicht’)
-> ‘Courses’ (‘Cursussen’)
-> ‘Earning’ (‘Verdiensten’)
-> ‘Statements’ (‘Verklaringen’)
-> ‘Students’ (‘Studenten’)
-> ‘Export’ (‘Exporteren)
-> Pretty much everything on this page is not translated
– /course-bundle/ bundle page
-> ‘Bundle Overview’ (‘Pakket overzicht’)
-> ‘Total Courses’ (‘Cursussen’)
-> ‘Total Enrolled’ (‘Ingeschreven’)
-> etc
Will this be fixed in a future update? Most of our students can’t read English that well.
Der Reihe nach:
Die Add-on-Einstellungen: “Enable Archive Page for the Default Courses CPT?” habe ich aktiv.
Nun sollten gem?? Anleitung alle Kurse auf einer virtuellen (nicht explizit angelegten!?) Seite example.com/courses angezeigt werden. Das stimmt auch, ok.
Man kann Kurse und deren Lektionen aufrufen.
Aber: Man kommt nicht mehr zurück. Denn in einer Breadcrumb Navi erscheint etwa folgendes:
Start > Courses > Kursname
Ein Klick auf Courses (Link: example.com/course) ergibt: Page not found (404). Logisch: Es gibt zwar eine virtuelle Seite “courses”, aber keine “course”!
Start > Lessons > Lektion 1
Ein Klick auf Lessons (Link: example.com/lesson) ergibt: Page not found (404). Hier ist ein ?hnliches Problem, es gibt ja weder eine Seite noch eine Kategorie namens “lesson”.
Dieses Verhalten bessert sich auch nicht, wenn man die anfangs erw?hnte Option deaktiviert und zum Beispiel eine eigene Seite namens “kurse” erstellt und darin z.B. den Shortcode [pmpro_my_courses limit="3"]
notiert.
Diese ist zwar anw?hlbar, aber es gibt wieder keine korrektes zurück navigieren …
M?glich, dass ich selbst dieses einfache Add-on nicht verstehe, daher bitte ich um eine noch bessere Anleitung dazu.
Anmerkung:
Beim erstellen/?ndern eines Kurses (Edit Course) erscheint ganz oben eine leere Zeile mit rotem Rand und mit einer vermutlichen Warnung. Doch da darin kein Text angezeigt wird, ist unklar, was hier falsch sein soll?