Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter blu377

    (@blu377)

    Hello again, it fixed thanks a lot!

    Can I ask what 99 at the end of here “‘sitemap_cat_fix’, 99);” means?

    And does it split sitmap.xml say if I have more than 1000 posts?

    Thread Starter blu377

    (@blu377)

    Thanks a lot Webbjocke, I will try. Also thanks for this great plugin.

    • This reply was modified 8 years, 1 month ago by blu377.
    Thread Starter blu377

    (@blu377)

    I changed it to not resolved, I guess when I select resolved and I type a reply it won’t go up.

    Thread Starter blu377

    (@blu377)

    Just an update, I deleted PHP closing tags ?> and changed the code for showing 10 posts for a single category. Now RSS works. Thanks.

    This is how my functions.php looks now, it might help someone, and if still something wrong please tell me.

    <?php
    function my_theme_enqueue_styles() {
    
        $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/style.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    
    add_filter('pre_get_posts', 'posts_in_category');
    
    function posts_in_category($query){
        if ($query->is_category) {
            if (is_category('news')) {
                $query->set('posts_per_archive_page', 10);
            }
        
        }
    
    }
    • This reply was modified 8 years, 1 month ago by blu377.
    • This reply was modified 8 years, 1 month ago by blu377.
    • This reply was modified 8 years, 1 month ago by blu377.
    Thread Starter blu377

    (@blu377)

    Thanks a lot. I found these on the internet, I don’t know anything about these codes or PHP but I will try.

    Thread Starter blu377

    (@blu377)

    Sorry, I do not want to share it here. Thanks.

    I checked with Google Chrome, on a newly installed wordpress feed starts like this:

    <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
    	xmlns:content="https://purl.org/rss/1.0/modules/content/"
    	xmlns:wfw="https://wellformedweb.org/CommentAPI/"...

    My site’s feed:

    
    
    <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
    	xmlns:content="https://purl.org/rss/1.0/modules/content/"
    	xmlns:wfw="https://wellformedweb.org/CommentAPI/"...

    Extra empty/blank 2 lines, other that everything same.

    I guess that’s the issue?

    Thread Starter blu377

    (@blu377)

    Can I not share the website? This is my child theme’s functions.php

    I tried to show 10 posts a page for one category by this code:

    <?php
    
    function my_theme_enqueue_styles() {
    
        $parent_style = 'parent-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
    
        wp_enqueue_style( 'child-style',
    
            get_stylesheet_directory_uri() . '/style.css',
    
            array( $parent_style ),
    
            wp_get_theme()->get('Version')
    
        );
    
    }
    
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    
    ?>
    
    <?php // Opening PHP tag - nothing should be before this, not even whitespace
    
    add_action('pre_get_posts', 'diff_post_count_per_cat');
    
    function diff_post_count_per_cat() {
    
        if (is_admin()) return;
    
        $cat = get_query_var('category_name');
    
        switch ($cat) {
    
            case 'news':
    
                set_query_var('posts_per_page', 10);
    
                break;
    
     
    
        }
    
    }
    
    ?>
    Thread Starter blu377

    (@blu377)

    Normally when I type example.com/feed/ Firefox opens Live Bookmarks automatically, now it wants to download a file says, you have chosen to open which is application/rss+xml…

    I guess I did something wrong in the functions.php

    Forum: Fixing WordPress
    In reply to: Feature request
    Thread Starter blu377

    (@blu377)

    Ok, thanks, best wishes.

    Forum: Fixing WordPress
    In reply to: Feature request
    Thread Starter blu377

    (@blu377)

    Why did I get 502 error for a few minutes? My account blocked? Did you guys think I am a spammer or…?

    “Why don’t you want to use plugins? That’s a more supportable solution than trying to add features to WordPress core.”

    Plugins makes WordPress vulnerable to threats and it slows down the site, also some plugins steals privacy info… When I check my server log, I can see some attackers search for some plugins, they target at those plugins. Am I wrong?

    You say even enable – disable revisions intentionally left to be used as a plugin?

    And attacks on wp-login.php? It’s a common issue.

    I can tell these by using WordPress only for two months.

Viewing 10 replies - 1 through 10 (of 10 total)