Forum Replies Created

Viewing 14 replies - 46 through 59 (of 59 total)
  • Pavel

    (@pavelk27)

    That’s right. By default Authors can see other’s media files, but can’t edit or delete them. You’ll need an external plugin for this.

    Pavel

    (@pavelk27)

    In your latest message you mentioned this url twice:
    https://site.domain/wp-json/wp/v2/posts?per_page=3
    both as working and not-working url. How it can be possible?
    Also, can you make sure that you have the following code in your wp-config.php

    define( 'WP_DEBUG', true );
     define( 'WP_DEBUG_DISPLAY', false );
     define( 'WP_DEBUG_LOG', true );
     define( 'SCRIPT_DEBUG', true );
     define( 'JETPACK_DEV_DEBUG', false );

    so it will save any errors in debug.log

    Pavel

    (@pavelk27)

    Hello,

    It would be a good idea to place that script into its own folder and exclude it via htaccess from WordPress redirects. It could be achieved with something like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_URI} !^/(mydir|mydir/.*)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    where mydir is the name of that folder.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    Make sure that you have a correct .htaccess file in root folder of your website and url rewriting is enabled in apache settings of your server.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    It could be related to url parameters in my opinion. In your example the following urls:

    https://site.domain/wp-json/wp/v2/posts&per_page=1
    https://site.domain/wp-json/wp/v2/posts&per_page=2
    https://site.domain/wp-json/wp/v2/posts&per_page=1&page=2

    should be:

    https://site.domain/wp-json/wp/v2/posts?per_page=1
    https://site.domain/wp-json/wp/v2/posts?per_page=2
    https://site.domain/wp-json/wp/v2/posts?per_page=1&page=2

    so the first query parameter is always preceded with ? sign, not an ampersand. Although, /wp-json/wp/v2/posts should always return posts, if there are any. Try to turn off all the plugins and enable debug mode in your wp-config to see if there are any errors.
    Also, make sure that you don’t mix posts&pages – they’re different in WordPress and you might need to use /wp-json/wp/v2/pages for your purposes.

    Thanks

    • This reply was modified 8 years ago by Pavel.
    Pavel

    (@pavelk27)

    Hello,

    The query seems to be correct, so it looks like there are issues in the template for the loop itself. Can you please provide code for render_frontend() or whatever generates search results items markup?

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    Looks like Subscribe To Comments Reloaded should fit your needs. Let me know if it helps.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    This error:

    Failed opening ” for inclusion

    usually is thrown when include path is incorrect. Check your templates for any php includes and correct paths there if necessary. You can upload code from your templates here if the issue persists.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    Have you checked your theme’s functions.php file? Some code related to nofollow attribute might be there, you can modify it to fit your requirements if so.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    I think this issue is connected to has_archive set to false in your code. So you need to set ‘has_archive’ to true in register_post_type()
    'has_archive' => true,
    Try to flush permalinks after you update that property, I believe it should help.
    Also, you might need to create a custom template for archive of this CPT, check this section of the codex.

    Thanks

    • This reply was modified 8 years ago by Pavel.
    Pavel

    (@pavelk27)

    What plugin do you use for web directory organization on your website? Please provide more info about your setup.

    Pavel

    (@pavelk27)

    Hello,

    I think it happens because of Heartbeat API:

    Heartbeat API allows your browser to communicate with the server when you’re logged into the WordPress admin panel. This functionality allows WordPress to handle things like showing other authors that a post is being edited by another user, plugins can hook up to those “ticks” and show you notifications in real time, etc.

    you can disable heartbeat completely by adding the following code into your theme’s functions.php file:

    add_action( 'init', 'stop_heartbeat', 1 );
    function stop_heartbeat() {
    wp_deregister_script('heartbeat');
    }

    or you can control heartbeat’s interval with Heartbeat Control plugin.
    Let me know if it helps.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    Author role should fit your needs in my opinion. By default, authors can edit only their own posts and media files, so you don’t need to add any additional restrictions and can use default user capabilities here.

    Thanks

    Pavel

    (@pavelk27)

    Hello,

    According to WP Codex, if you want to have WP in a sub-directory, you need to have .htaccess file inside of the root folder with code like this:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    RewriteCond %{REQUEST_URI} !^/my_subdir/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /my_subdir/$1
    RewriteCond %{HTTP_HOST} ^(www.)?example.com$
    RewriteRule ^(/)?$ my_subdir/index.php [L] 
    </IfModule>

    I’m also not sure about keeping index.php (even with JS redirect in it) in a root folder – it can be a problem too. Try to rename it to something like index.php.bkp to see if it helps. And the last but not least step – check with your hosting provider if they have any server-side caching, which could be an issue as well.

    Good luck!

Viewing 14 replies - 46 through 59 (of 59 total)