Forum Replies Created

Viewing 15 replies - 166 through 180 (of 681 total)
  • Here’s how your scripts should be enqueued (this code goes in functions.php of your child theme):

    add_action( 'wp_enqueue_scripts', 'jvectormap_enqueue_scripts' );
    function jvectormap_enqueue_scripts() {
    	if (is_page_template('jvectormap.php')) {
    		wp_enqueue_style( 'jvectormap-style', get_stylesheet_directory_uri() . '/js/jquery-jvectormap.css', array(), null, 'all' );
    		wp_enqueue_script( 'jvectormap-script', get_stylesheet_directory_uri() . '/js/jquery-jvectormap.min.js', array( 'jquery' ),null , true );
    		wp_enqueue_script( 'jvectormap-map', get_stylesheet_directory_uri() . '/js/jquery-jvectormap-world-mill-en.js', array( 'jquery' ), null, true );
    		wp_enqueue_script( 'jvectormap-map_code', get_stylesheet_directory_uri() . '/js/map_config.js', array( 'jquery' ), null, true );
    	}
    }

    If it’s not obvious, you should remove all lines that enqueue scripts from your template.

    As for jvectormap’s responsiveness, you should try and get help from the author of the plugin/library.

    However, I do have one question. What does all of this have to do with Customizr? You’re using twentyeleven.

    Before giving the last answer I already tried multiple options for achieving what leecrockett wants. The closest result can now be seen on the test site I mentioned earlier and it involves two hooks, one before and one after the heading of the post/page. Here’s the code:

    add_action('__before_content', 'header_thumb_start', 0);
    add_filter('__before_content', 'header_thumb_end', 200);
    function header_thumb_start () {
    	global $post;
    	if (is_singular() && !(is_home() || is_front_page()) && has_post_thumbnail($post-ID)) {
    		echo '<div class="row-fluid"><div class="span7">';
    		}
    	}
    function header_thumb_end ($output) {
    	global $post;
    	echo $output;
    	if (is_singular() && !(is_home() || is_front_page()) && has_post_thumbnail($post-ID)) {
    		echo '</div>';
    		$thumb_data = TC_post_list :: tc_get_post_list_thumbnail();
    		TC_post_list :: tc_post_list_thumbnail( $thumb_data , 'pull-right span5' );
    		echo '</div>';
    		}
    	}

    However, it leaves a space between the heading and the content, as the content is displayed as block and gets displayed under the right floating thumbnail. The workaround for this would be to have the content have a negative top margin and add an empty floating element to it that would prevent the text from being displayed under the thumbnail, but it has to be done for each page width case, using media queries. Too much work, if you ask me.

    You have multiple options. If you don’t want the widget space, just select full width as page template for front page in Customize options.

    The widget logic to not display on first page is

    if (!(is_home() || is_front_page()))

    That’s what I meant when I said “the function that adds the map” (i was supposing you’re getting it through php. I should have said “the placeholder for your map, be it a div with a certain id modifiable via jQuery or by a php function.

    Good to know you’re on track.

    As to your previous question, in order to allow so many different pieces of code to work together, most of them being developed by different people, WP has a logic and a flow they all respect. From the user request to the rendered page. Frankly I’m surprised to see your page works, because wp_enqueue_scripts is run during the output of the head section of the page. In our case it’s on this line:

    <?php do_action( '__before_main_wrapper' ); ##hook of the header with get_header ?>

    So you’re deregistering jquery before it has been registered, and my guess is your map runs on WP’s jQuery anyway (which is always up to date, btw). Or maybe WP checks to see if jquery is already registered and doesn’t duplicate it, i don’t know. Or maybe I’m wrong and the registering is done before any output and only the enqueuing is done in <head>. Never needed to take a closer look at this.

    Your method is prone to error. Hook your scripts on the proper hook as it’s certain they’ll still work in WP 24.5.2, too.

    It’s achievable, yomster. The problem is you’re using 2311 x 500 px images. Why not 1170 x 500px? They look great on large screens too and you won’t have the gray bar problem.

    A look at the linter will give you the answers you’re looking for.

    Provided og:image is not big enough. Please use an image that’s at least 200×200 px. Image ‘http://www.breastdiagnostic.com/wp-content/uploads/2014/01/tomato-in-glass.jpg&#8217; will be used instead.

    If your original image should be larger than 200 x 200 either total cache or wordpress seo are messing with what is served to facebook. If it’s important for you, you should use a plugin to control the output for facebook (a sharing plugin) like simple share buttons, etc… there are a ton out there.

    First question: why are you deregistering WP’s local jquery and loading an external one?
    Second, why aren’t you registering your scripts during wp_enqueue_scripts with an action hook placed in your functions.php?
    And lastly: didn’t you forget to add the function that outputs the map in your template?

    It’s too much work to make it look good in all cases. Remember it’ a responsive theme. And you got us mixed up. I’m not feet :).

    @rdell, he’s not trying to change the opacity of the caption, but of the carousel itself (i think).
    @yomster: what you see there is the background of the page, which is set to #fafafa. You either change the background of the page to white and set #fafafa background color on #main-wrapper (in order to keep it as it is now in the rest of the page), or you change the dimension of your pictures and make sure their height is the recommended 500px. A third option is to set carousel background color to white.

    Changing the slider height is not something I’d recommend, as it’s difficult to do without messing up theme’s responsiveness.

    While gernericons require less coding to upgrade, bootstrap 2.3.2 is the foundation of this theme. There are plans for it, but no prediction can be made.

    Change fr_FR from the following function into the locale of the language you want to see Customizr in and add the code to your child theme’s functions.php:

    add_action('after_setup_theme', 'change_customizr_locale');
    function change_customizr_locale() {
    	unload_textdomain('customizr');
    	load_textdomain('customizr', get_template_directory().'/lang/fr_FR.mo');
    	}

    There is no such button. Not for any theme. Customizr takes WPLANG from WordPress and displays in that language. I’ll look deeper into this to see if I can make a function that changes locale for Customizr only.

    Open wp-content/plugins/qtranslate/qtranslate.php
    Modify line 90 to:

    define('QT_SUPPORTED_WP_VERSION', '3.8.1');

    Save & upload.

    Here’s what you need to do:

    1. Rename your uploads folder to anything else (i.e. old_uploads)
    2. Create a new uploads folder.
    3. Set chmod permissions of the new folder to 777.
    4. Upload the image you were trying to upload (it should work now).
    5. Copy all contents of old_uploads into uploads
    6. IMPORTANT: Change chmod permissions recursively to your uploads folder to 755.
    7. Delete your old_uploads folder.

    You’ll be able to upload now. This is a known WP bug, has nothing to do with Customizr.

    The easiest way to achieve this is by using a redirect plugin for your pages and posts. You’d than be able to create dummy posts/pages that actually redirect to your desired locations and you could select them from the Customizr list.

Viewing 15 replies - 166 through 180 (of 681 total)