Forum Replies Created

Viewing 15 replies - 16 through 30 (of 138 total)
  • Hi!

    It is actually very easy to do. Since you are adding just one custom keyword to the URL (after what seems the slug for your custom post type and the name of the post), the 3rd part of your url can be implemented as an additional query_var. You then use rewrite_rules to pick up that value from your URL. Last, in the template for your custom post type (somewhat like player-single.php), load a custom template based in the query var.

    Let’s say, you put a custom action in your custom post type single template, which, according to the value from the query_var (and this from your URL, according to your rewrite rule), loads the template you make for display of the subpage for the specific player post.

    <?php wp_head(); ?></head>
    <?php switch(get_query_var('subpage')) {
        case 'single':
            get_template_part('player', 'single');
            break;
        case 'double':
            // your implementation
        case default:
            break; // don't take everything your users could throw in the URL
    } ?>
    <?php wp_footer(); ?>

    I’ve seen this kind of malfunction on CSS stylesheets (not getting retrieved), while using SuperCache and W3 Total Cache before having everything set up right.

    My issue usually has been an error on .htaccess rules, as Ipstenu is asking for check. My dumbest error was not including the “RewriteBase /” directive. Sometimes has been a harder to spot, since even the slightest error on the directives can render 403-code, or even 500-errors.

    As Ipstenu has recommended previously, re-check your .htaccess rules and use only that provided by WP, I’d recommend disabling caching plugins too (and any other plugin for redirection or messing up with permalinks {some SEO plugins do that, in example}).

    Then, try to see if your blogs are usable (entering wp-admin, making a post, accessing the feeds, etc.), the enabling only a plugin/feature at once; I know this seems an awkward method looking like starting from scratch, but It’s not wise enabling every available optimization without checking everything is fine step by step.

    Good job James!

    Of course, there is a performance hit for every directive on .htaccess, and every .htaccess file. But some directives can help you gain a bit of performance for your site, like instructing browsers to cache static files, or redirect requests for pages prerendered to cached versions rather than processing every time the same request through all the code of you WP site.

    I’d recommend you try W3 Total Cache and CloudFlare, these things properly configured can be a real boost to the performance of your site. Also, I don’t know if hostgator supports fastcgi, but if your site has a lot of traffic, it can be a real easy boost. CloudFlare is very easy to set up, and maybe hostgator is already partnering with them, then the set up is just a matter of registering your account, then make some clicks in your CPanel.

    Finally, don’t forget mark this thread as resolved, please.

    Good luck with your site!

    Thread Starter tzkmx

    (@tzkmx)

    Great, I look forward to the next releases!

    Maybe you have the option to restore the SQL backup through phpMyAdmin?

    I’m pretty sure you are using other plugins writing to .htaccess, I’m using this plugin rules, plus W3 Total Cache rules, plus custom rewrite rules and I have only 500 lines, 19805 characters. Of course the rules could be parsed and rewritten into httpd.conf more concise and efficient directives, instead of .htaccess rules, but in shared hosting we have not that feature.

    You really should check what’s going with your .htaccess, dude, this is the reason why this plugins recommends blocking the write permissions on wp-config and htaccess.

    Thanks for sharing your tips Okoth1 and Ksaveras, I’ve not deleted the whole rule filtering QUERY STRINGS starting with http, but only those not pulled by the timthumb script specific to the theme I’m using, for best reference, I’ve used this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} ^http\://(www\.)?example\.com/wp-content/uploads/(.*)(jpe?g|png|tiff?) [NC]
    RewriteCond %{SCRIPT_FILENAME} !^(.*)wp-content/themes/MYTHEME/timthumb.php
    RewriteRule ^(.*)$ - [F,L]
    # We use only http protocol, thus blocking anything starting w/https
    RewriteCond %{QUERY_STRING} ^https\: [NC]
    RewriteRule ^(.*)$ - [F,L]
    
    </IfModule>

    I’m trying to limit this way the vulnerabilities introduced by timthumb, and understanding how to allow specific plugins/themes still working, without disabling entirely features offered by Better WP Security.

    Thread Starter tzkmx

    (@tzkmx)

    Thanks a lot, I’d prefer to load by myself the specific parts on my theme, instead of relying in yet another plugin running a lot of functions and DB queries. But your answer is what i was looking for.

    Is not the browser nor this plugins fault. You need to work with your page loading custom script (check this plugin admin page) in order to reload the classes of the body tag (if your theme uses that to load custom styles on every page/category/etc.) or even the inline styles some themes use for custom designs. It depends on the complexity of your theme.

    This is not an “activate and it magically works without needing you to do anything” type of plugin. Check your theme, and put in your setting into which area you’d like to load the contents of your inner pages.

    So far I’ve understood the plugin code, it’s not feasible but you could rewrite it a bit in order to:

    – load the scripts only in the page you need that functionality

    – then, on document.ready, fire the AJAX action to load the content in the area you want

    So, It’s not so easy, and if you only want that function in an specific homepage, probably you would be best served with children pages.

    AJAX should be used to enhance the users experience, not only to provide a fancy effect.

    My 2 cents

    I’ve seen a plugin around here for custom ordering of the post displayed by a loop, but not sure where, try searching for custom post types with custom ordering.

    I’d say there are even easier plugins for localization than this, but the ones I know are not well integrated with the standard support for localization of gettext files, but they save the strings localized in the database, so is a PITA exporting them to another sites, even if they seem easier to use at first.

    So it’s not really the easier at first sight, but is a lot better than other solutions since you can take your work and put to other sites your plugins and theme translations.

    Hi! I’m working for an NGO previously hosted in an IIS 7.5 box, they also want to build later a second site for their office in another city, however those are plans at least for 2 months in the future, so I’d have a chance to test things in the meanwhile, and later test the plugin for both sites, preferably a multisite network.

    So, I’d be glad to help us, it’s my first time working with an IIS box, but this is a very loved NGO and I’d hate to not having them secured with this plugin that has given us very good results for other of our clients with Linux servers.

    thanks for the links, accesibility it’s a very strong issue against using display-none; I’ll take it into my specifications to build new designs.

Viewing 15 replies - 16 through 30 (of 138 total)