Forum Replies Created

Viewing 11 replies - 181 through 191 (of 191 total)
  • Thread Starter Richard Vencu

    (@rvencu)

    So, let do some hacking here.

    Because we want to publish resume for multiple people it is safe to consider those people are at least authors on the website, so we will use the post author meta to filter the ‘resume positions’. For this we need to pass the author ID to the query, so we change the function inside wp_resume.php like this

    function wp_resume_query( $section, $author = '' ) {
    
    	//build our query
    	$args = array(
    		'post_type' => 'wp_resume_position',
    		'orderby' => 'menu_order',
    		'order' => 'ASC',
    		'nopaging' => true,
    		'author' => $author,
    		'wp_resume_section' => $section,
    	);
    
    	//query and return
    	$query = new wp_query($args);
    	return $query;
    }

    Now we need a way to pass the author ID. I will use this approach: create an argument list with author attribute for the shortcode, so if the ID is passed as an attribute inside the shortcode then it is used directly. If there is no attribute then we will check the resume page author ID and we will pass that ID instead.

    I will come back with the required code soon.

    Thread Starter Richard Vencu

    (@rvencu)

    Hi @mvied, I updated the plugin and it is working very well. If I catch any error I will notify you ASAP.

    Great solution!

    Thread Starter Richard Vencu

    (@rvencu)

    yes, i believe so, still I had to use a parent theme and play around the child theme. by definition the child theme is using the @import directive

    at some other case I found useful to remove all scripts and css files from header.php and insert them via functions.php by using ‘register’ and ‘enqueue’ commands and specify dependencies. I could avoid double loading of jquery library this way, also to conditionally upload some css files depending on the context. What do you think, is this method OK from the performance point of view? Is W3TC handling these files?

    maybe increase this number to more than 3?
    'showposts' => 3,

    Thread Starter Richard Vencu

    (@rvencu)

    True, however I am looking at Chrome Developer Tools in Resource Section, Time and I can see:
    – load of HTTP page and decision to redirect – 1.02s
    – load of HTTPS page (from cache – is true) – 65ms
    – load of other elements – 0.25s
    – DOMContent event fired – 1.36s
    – Load event fired – 1.48s

    So when the cache is involved, the redirection takes most of the time. At this speed there is no problem but if the reader is across continents the latency will just double and the page tends to become very slow.

    If I get any idea how to do it I will let you know.

    Cheers

    Thread Starter Richard Vencu

    (@rvencu)

    Yes, it works as intended. However what I wanted to say is that I need menus to point me to a mixed load of http and https links. Now they all point to the http then the http page loads, then it is redirected to https page.

    If the server is severely loaded then the redirect is taking few seconds and the final page is displayed very slow. Therefore I thought maybe there is a way to construct the menu directly with proper http and https links according to the force_ssl custom field.

    Thread Starter Richard Vencu

    (@rvencu)

    I would like to see a similar thing in the WP custom menus I am using so there would be no more redirects from http to https into those pages

    Thread Starter Richard Vencu

    (@rvencu)

    One mention: all css files left outside are called with @import directive (first the style.css of the parent as in child theme development, then another 7 files from the parent theme’s style.css (as developed in Hybrid theme)

    Thread Starter Richard Vencu

    (@rvencu)

    I just did it

    Forgot to add this: if after fixing the files the editor still does not load please refresh your browser cache by using Ctrl-F5 for example.

    Hi, here I have the same problem. The fact is that the hosting company does support gzip but the gzip encoding somewhat breaks the already gzipped file.

    If you want a quick fix you have to sacrifice some bandwidth every time you use the editor (from 80k to 260k) – not so much.

    1. download your wp-tinymce.js.gz file
    2. uncompress it and upload the wp-tinymce.js
    3. edit wp-tinymce.php file like this
    – comment the old code (so you can always revert it to original state)
    – insert the new code
    – result should look like this

    //if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
    //	&& false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && ( $file = get_file($basepath . '/wp-tinymce.js.gz') ) ) {
    
    if ( isset($_GET['c']) && 1 == $_GET['c'] && isset($_SERVER['HTTP_ACCEPT_ENCODING'])
    	&& ( $file = get_file($basepath . '/wp-tinymce.js') ) ) {
    
    	//header('Content-Encoding: gzip');
    	echo $file;
    } else {
    	echo get_file($basepath . '/tiny_mce.js');
    }
    exit;

    How it works? It does not care anymore about gzip and always loads the uncompressed js file. In my case this fix was good enough.

Viewing 11 replies - 181 through 191 (of 191 total)