Wordpress

Everything interesting about Wordpress

Custom Fields

Pods Framework

Home - Pods Framework

Use in Templates

    <dl>
        <?php

            $fields = get_post_meta($post->ID);
            $pod = pods( 'event', get_the_id() );
            // filter Template and other Metafields starting with `_*`
            $fields = array_filter($fields, function($k){
                return strpos($k,'_') !== 0 && strpos($k,'cmsms_') !== 0;
            }, ARRAY_FILTER_USE_KEY);

            //print_r($fields);
            // https://pods.io/docs/code/pods/fields/
            foreach($fields as $key => $value){
                printf(
                    '<dt>%s:</dt> <dd>%s</dd>', 
                    $pod->fields($key,'label'), 
                    $pod->display($key)
                );
            }
        ?>        
    </dl>

Advance Custom Fields

(not used yet)

Extensions

WP Code

https://wpcode.com/

Backend

Multisite—Network Setup

Use same content across network:

Maintenance Page

  • Maintenance
    • Blurry Background
    • Login on Frontpage
  • WP Maintenance Mode
    • counter

Gutenberg Blocks

Maintenance WP

WP-Sweep

WP-Sweep ermöglicht es dir unbenutzte, verwaiste und doppelte Daten in WordPress zu bereinigen. Es bereinigt Revisionen, automatische Entwürfe, nicht genehmigte Kommentare, Spam-Kommentare, Kommentare im Papierkorb, verwaiste Beitrags-Metadaten, verwaiste Kommentar-Metadaten, verwaiste Benutzer-Metadaten, verwaiste Begriffsbezugsdaten, unbenutzte Begriffe, doppelte Beitrags-Metadaten, doppelte Kommentar-Metadaten, doppelte Benutzer-Metadaten und transiente Optionen. Es optimiert auch deine Datenbanktabellen.

Redirection

Verwalte alle 301-Umleitungen und 404-Fehler.

Regenerate Thumbnails Advanced

Regenerate thumbnails fast and easy while removing unused thumbnails of existing images; very useful when changing a theme.

Make Paths Relative

Make Paths Relative – WordPress-Plugin - This plugin converts the URL(Links) to relative instead of absolute. This has some pitfalls, because sometimes (in Emails) you need absolute URLs

Better Search Replace

Replace Urls in Serialized Data

Server Settings

Custom PHP Settings – WordPress plugin | WordPress.org

Events

Event Organiser

Erstellt einen individuellen Termin mit Features wie wiederholende Termine, Veranstaltungsorte, Google-Maps-Karte, Kalenderansichten und -termine und Seiten für Veranstaltungsorte

Directory, Geo Maps

Ultimate Maps by Supsystic

Toolset Directory (170 USD)

https://toolset.com/learn/build-directory-classifieds-sites-using-toolset/

Privacy and Legal

Caching, Queries

Member, Access Control

Ultimate Member

Website

Setup for a Mostly Private Blog

To create a private blog with some public posts (based on category), and to exclude those public posts from the RSS feed and post listing, configure UM as follows:

These settings can cause a redirect loop when a protected page is accessed directly (e.g., via an email notification for a new post).

The following WP-Code snippet resolves this redirect issue:

function redirect_um_restricted_404_to_login() {
    // Prevent redirect loop - don't redirect if already on login page
    if (is_404() && !is_admin() && !isset($_GET['um_redirect_check'])) {

        // Don't redirect if this is the login page itself
        $login_page_id = UM()->config()->permalinks['login'];
        if (is_page($login_page_id)) {
            return;
        }

        global $wp_query;

        // Get the requested URL path
        $requested_url = $_SERVER['REQUEST_URI'];

        // Skip if already redirected once (cookie check)
        if (isset($_COOKIE['um_redirect_attempted'])) {
            return;
        }

        // Try to find if this is a restricted post that exists
        $post_id = url_to_postid($requested_url);

        if ($post_id && !is_user_logged_in()) {
            // Check if it's in the restricted category
            if ($post_id && has_category(['non-public', 'personal'], $post_id)) {
                // Set a temporary cookie to prevent loop
                setcookie('um_redirect_attempted', '1', time() + 30, '/');

                $login_url = home_url('/login/');
                $redirect_to = urlencode(home_url($requested_url));
                wp_redirect($login_url . '?redirect_to=' . $redirect_to . '&reason=members-only&um_redirect_check=1', 302);
                exit;
            }
        }
    }
}
add_action('template_redirect', 'redirect_um_restricted_404_to_login', 1);

// Clear the redirect cookie after successful login
function clear_um_redirect_cookie() {
    if (isset($_COOKIE['um_redirect_attempted'])) {
        setcookie('um_redirect_attempted', '', time() - 3600, '/');
    }
}
add_action('um_after_login_fields', 'clear_um_redirect_cookie');

Appointments

Translation

Theme-Translations are expected in /wp-content/languages/themes/[THEME NAME]-[lc_LC].mo

File:      /wp-content/languages/themes/econature-de_DE.mo (not found)
Called in: /wp-content/themes/econature/functions.php line 492 load_theme_textdomain

To debug that crap, use Debug MO Translations and look at the end of the page. It reveals what paths are expected.

Themes

Kadence Theme and Blocks

these are more superior to

Neve Themes and Otter Blocks

claims to be a fast theme and it is, if you don't use their blocks.