Forum Replies Created

Viewing 15 replies - 1 through 15 (of 63 total)
  • Thread Starter pkiula

    (@pkiula)

    Any thoughts?

    Thread Starter pkiula

    (@pkiula)

    Thank you.

    If this kind of Jquery etc are required for WP Forms (which would make it a non-starter for any performance oriented website, which should be all of them), then my next question would be: is it possible to open a form designed by WP Forms inside a modal window or lightbox? Then submit the form via AJAX within the modal… without reloading the entire page? DOn’t mind doing this inside an iframe inside the modal.

    Please check with the developers for any ideas. We cannot have 6 additional JS files for *every* visitor on our website. We will need to find a way to conditionally include WP Forms code only when a user wants to fill the form… for example, while signing up for Constant Contact newsletters.

    Many thanks.

    Thread Starter pkiula

    (@pkiula)

    Is there anyone here? We have fairly sophisticated
    “warm preloader” on our own. It goes through our sitemap and “curl’s them, so Cache Enabler is already writing the requisite files in the /cache/cache-enbaler/[domain.com] folder.

    Secondly, we have Apache rules in our .htaccess, and importantly, this is ABOVE the wordpress block:

    
    #===========================================================
    # BEGIN Cache Enabler
    
    <IfModule mod_rewrite.c>
        <IfModule mod_setenvif.c>
            RewriteEngine On
            RewriteBase /
    
            # cache directory
            SetEnvIf Host ^ CE_CACHE_DIR=/wp-content/cache/cache-enabler
    
            # default cache keys
            SetEnvIf Host ^ CE_CACHE_KEY_SCHEME http-
            SetEnvIf Host ^ CE_CACHE_KEY_DEVICE
            SetEnvIf Host ^ CE_CACHE_KEY_WEBP
            SetEnvIf Host ^ CE_CACHE_KEY_COMPRESSION
    
            # scheme cache key
            RewriteCond %{HTTPS} ^(on|1)$ [OR]
            RewriteCond %{SERVER_PORT} =443 [OR]
            RewriteCond %{HTTP:X-Forwarded-Proto} =https [OR]
            RewriteCond %{HTTP:X-Forwarded-Scheme} =https
            RewriteRule ^ - [E=CE_CACHE_KEY_SCHEME:https-]
    
            # device cache key
            # SetEnvIf User-Agent "(Mobile|Android|Silk/|Kindle|BlackBerry|Opera Mini|Opera Mobi)" CE_CACHE_KEY_DEVICE=-mobile
    
            # webp cache key
            # SetEnvIf Accept image/webp CE_CACHE_KEY_WEBP=-webp
    
            # compression cache key
            # <IfModule mod_mime.c>
            #     SetEnvIf Accept-Encoding gzip CE_CACHE_KEY_COMPRESSION=.gz
            #     AddType text/html .gz
            #     AddEncoding gzip .gz
            # </IfModule>
    
            # get cache file
            SetEnvIf Host ^ CE_CACHE_FILE_DIR=%{ENV:CE_CACHE_DIR}/%{HTTP_HOST}%{REQUEST_URI}
            SetEnvIf Host ^ CE_CACHE_FILE_NAME=%{ENV:CE_CACHE_KEY_SCHEME}index%{ENV:CE_CACHE_KEY_DEVICE}%{ENV:CE_CACHE_KEY_WEBP}.html%{ENV:CE_CACHE_KEY_COMPRESSION}
            SetEnvIf Host ^ CE_CACHE_FILE=%{ENV:CE_CACHE_FILE_DIR}/%{ENV:CE_CACHE_FILE_NAME}
    
            # check if cache file exists
            RewriteCond %{DOCUMENT_ROOT}%{ENV:CE_CACHE_FILE} -f
    
            # check request method
            RewriteCond %{REQUEST_METHOD} =GET
    
            # check permalink structure has trailing slash
            RewriteCond %{REQUEST_URI} /[^\./\?]+(\?.*)?$
            # check permalink structure has no trailing slash
            # RewriteCond %{REQUEST_URI} /[^\./\?]+/(\?.*)?$
    
            # check excluded query strings
            RewriteCond %{QUERY_STRING} !^(?!(fbclid|ref|mc_(cid|eid)|utm_(source|medium|campaign|term|content|expid)|gclid|fb_(action_ids|action_types|source)|age-verified|usqp|cn-reloaded|_ga|_ke)).+$
    
            # check excluded cookies
            RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
    
            # deliver cache file
            RewriteRule ^ %{ENV:CE_CACHE_FILE} [L]
    
        </IfModule>
    </IfModule>
    
    # END Cache Enabler
    #===========================================================
    
    #===========================================================
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    #===========================================================
    
    

    But:

    1. Cache Enabler is often not finding its own cached files. In totally new Incognito window, so no user logged in. It should be serving cached files.

    2. The Apache logic above seems never to be met… so CE is always going to wordpress.

    Any thoughts?

    Thread Starter pkiula

    (@pkiula)

    Ah, i notice this was asked and answered. A plugin called “Warm Loader”. But we’d like to do this on our own, without yet another plugin.

    So we wrote a script that “curl”s the website every hour or so.

    I found that this doesn’t do anything. In fact it slows down the website further. What am I missing? Does Cache Enabler deal with curl requests differently? In the dashboard I can see the cache size is increasing when our cron script runs. But the website is slow and in an incognito window (non logged in user) the pages loading are NOT the ones from the cache.

    Any tips? Are we overwriting and confusing the Cache Enabler functionality somehow? What could we do to ‘check’ that the cache for a page exists, and access it via curl only if the cache does NOT exist?

    Thanks.

    Thread Starter pkiula

    (@pkiula)

    No.

    I am referring to custom fields that are associated with CPTs (custom post types).

    Anyway, thanks. This plugin is not for me. Good luck.

    Thread Starter pkiula

    (@pkiula)

    Thanks for clarifying. So the shortcode is irrelevant to me.

    On the theme side, the usual POSTS stuff does NOT pick up any of the custom fields.

    Thread Starter pkiula

    (@pkiula)

    I am the theme support. It’s my theme.

    I am asking how to retrieve all the fields.

    To test it out, I put a short code into a sample post. It does NOT work. It does not get any of the custom posts I’ve specified in the form’s settings. I need the search to look into specific custom fields with a LIKE match. It doesn’t.

    Suppose this kind of plugin helps people who have no clue about templates etc, and “need to contact their theme developer”.

    Anyway, thanks.

    Thread Starter pkiula

    (@pkiula)

    Thank you. I am trying the plugin. But I cannot find anywhere in the documentation how to get specific fields for my theme display.

    For example, I need the search to cover following post types:

    1. page
    2. posts
    3. events (custom post type, and search should look into specific custom fields)
    4. books (custom post type, and search should look into specific custom fields)

    Then, in my search.php theme, while displaying, I need for each search result:

    • title
    • excerpt (in custom types, this comes from specific custom fields)
    • image thumbnail (in custom post types, this comes from specific custom fields)
    • link to the piece (for custom post types, I’ll need to edit this with some code)

    How can I retrieve these fields? No short codes etc please. Where can I find the documentation for actual fields directly. I don’t need to put shortcodes anywhere. And the search form is my own – I just need the search to combine WP_Query for multiple post types, and then easily pass me the above fields for theming, along with pagination.

    PS. I am my own theme author. There’s no child theme etc. It’s just a simple search.php. I am familiar with theming.

    Is this doable?

    • This reply was modified 2 years, 7 months ago by pkiula.
    Thread Starter pkiula

    (@pkiula)

    I’ve disabled all the plugins other than CPT UI. Same issue.

    Thread Starter pkiula

    (@pkiula)

    Thank you Michael. I have Query Monitor on. What should I be looking for?

    Thread Starter pkiula

    (@pkiula)

    Thanks. I already know this. But installing WP in the root folder is not an option for us.

    Thread Starter pkiula

    (@pkiula)

    OK, so I downloaded the Custom Post Permalinks plugin as recommended in this forum elsewhere.

    Now this URL works, yay!

    /resources/health/find-a-clinic
    

    But these now give 404:

    /resources
    /resources/health
    

    Anything I am missing?

    Thread Starter pkiula

    (@pkiula)

    Looks like no one knows. How does the theming change with two languages – do we refer to the same fieldname? How does language automatically get reflected in the URL structure?

    Thread Starter pkiula

    (@pkiula)

    Thanks. I’ve already pulled in a mysqldump and it apparently brings in the users differently because “MySQL.user” is not a table anymore since 10.4 version of mariadb, it’s a view. Some new security stuff which breaks things and the documentation is horribly vague.

    Thread Starter pkiula

    (@pkiula)

    As in export via WordPress and import again? WordPress export is notoriously incomplete. Or do you mean use something like duplicator?

    I thought moving the data directly from myself via mysqldump and then restore is easier, cleaner.

    Welcome thoughts. Or just a clear directive on how to create users in the new MariaDB and allow them access to specific databases.

Viewing 15 replies - 1 through 15 (of 63 total)