Tag Info

Hot answers tagged

14

Internationalization and localization (commonly abbreviated as i18n and l10n respectively) are terms used to describe the effort to make WordPress (and other such projects) available in languages other than English, for people from different locales, who use different dialects and local preferences. __() is used when the message is passed as an ...


11

Found the answer here: Script dequeuing calls should be added to the wp_print_scripts action hook(..). This is because scripts are typically enqueued on the wp_enqueue_script hook, which happens early in the wp_head process. The wp_print_scripts hook happens right before scripts are printed, and thus is latest in the process. (Otto) Following ...


5

The background is a option. You can set colors and also images. See in the Administration area, Appearance --> Background Also you can use the Live Preview link on the theme and customize the background and other otpions.


4

On WP 3.8+, I sucessfully removed 'Open Sans' from my frontend styles using thetrickster's gist: <?php // Remove Open Sans that WP adds from frontend if (!function_exists('remove_wp_open_sans')) : function remove_wp_open_sans() { wp_deregister_style( 'open-sans' ); wp_register_style( 'open-sans', false ); } ...


4

I had exactly the same problem. In the base TwentyTwelve theme there has been a code change so that the site navigation changed from h3 to button. You need to update header.php file in the child theme to use <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button> See WordPress TRAC #28824 comment 13 The problem ...


3

If your code requires themes changes it belongs to the theme, usually the functions.php. In a custom child theme this is not a problem, in a plugin for everyone, it will be much harder. :) The best option to get a theme more flexible: Ask the theme author to add a hook. Provide a real use case. If you don’t want t wait, add the hooks to your child theme. ...


3

You could probably just buffer the output from comments_popup_link in a separate function. function get_comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) { ob_start(); comments_popup_link( $zero, $one, $more, $css_class, $none ); return ob_get_clean(); }


3

Check that it is turned on inside the Screen Options at the top.


2

It sounds like you just need to remove support for the custom background color. remove_theme_support( 'custom-background' ); You will probably need to hook it to get it to run after the parent functions.php function disable_bg_wpse_97248() { remove_theme_support( 'custom-background' ); } add_action('after_setup_theme','disable_bg_wpse_97248',100)


2

Put the template file in your theme and add the following comment to the top of your file after the /** * Template Name: This is the name of your template */ WordPress will pick this up and in the page templates dropdown you will see "This is the name of your template" listed as an option


2

This is the intended behaviour on an iPhone or other mobile device (it's called 'responsive design'). Because you have a much narrower screen on a mobile it's very likely that if you have more than four or five top-level pages, the navigation menu starts to wrap on to two lines and become messy & difficult to use. There's no simple disable option, ...


2

The code in question is in header.php, line 45. <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?> This is the Codex reference to this function: wp_nav_menu. From my experience, and some googling, this previous answer has the answer you're looking for. If possible, would just adding a class to the ...


2

In the functions.php of Twenty Twelve v1.1, a comment explains how to remove the stylesheet from the wp_enqueue_scripts hook: function mytheme_dequeue_fonts() { wp_dequeue_style( 'twentytwelve-fonts' ); } add_action( 'wp_enqueue_scripts', 'mytheme_dequeue_fonts', 11 ); Your attempt that didn't work was missing the priority parameter in the ...


2

Those classes are output by the body_class function, which can be filtered by plugins to add their own classes. You don't need to (and shouldn't) harcode classes into the body tag in your template, just add that function within the body tag: <body <?php body_class(); ?>>


2

I think you are looking for general HTML/CSS templates, not Wordpress themes. As the name suggests, Wordpress themes are designed to be used with Wordpress only. For general HTML/CSS templates, you could search Google for phrases such as: "HTML CSS themes" "HTML CSS templates" "HTML CSS themes 2014" etc.


2

/wp-content/themes/twenty-twelve/style.css will have a lot of the visual elements of the theme in it to get inspiration, however you must realise that each of the elements coded into the css is designed to go with each one of the div or other elements designed in wordpress... Back coding it will almost be harder than writing it from scratch. Also ...


2

I think you mean these class definitions in style.css: /* =Media queries -------------------------------------------------------------- */ /* Minimum width of 600 pixels. */ @media screen and (min-width: 600px) { ...cut... .site { margin: 0 auto; max-width: 960px; max-width: 68.571428571rem; ...


2

You'll find that WordPress itself also loads Open Sans (at least version 3.8). In fact, it was loading Open Sans three times for me: one for the WP admin, one for the TinyMCE editor, and another for the page. If your goal is removing Open Sans altogether, you'll have to hack WordPress itself (or stay with an older version). My own code to remove the Open ...


2

You should not use query_posts at all. Everything is explained in this post I have recently done. Check out all the links as well that I've given in that post The big problem why your pagination doesn't work is that the default twenty twelve pagination function, twentytwelve_content_nav, doesn't make provision for custom queries. You can, however, override ...


1

Replace the image code with the below one. Actually you are giving the root path in your image source but the image is in your theme folder. Also check if the images folder name is image or images. <img src="<?php bloginfo('template_directory'); ?>/image/logokovil.png" alt="logo" height="100" width="100">


1

There are some confusing information in your question and some important information missing Did you set a static front page as it is suggested in your code Do you need to achieve this on your front page or homepage Why aren't you using the front-page.php template included if you have set a static front page, that is actually exactly what you need. The ...


1

If you are using yoast SEO plugin then the easiest method is to remove the archive word from "titles & metas-> Taxonomies->category" find: %%term_title%% Archives %%page%% %%sep%% %%sitename%% replace it with: %%term_title%% %%page%% %%sep%% %%sitename%%


1

Some points of interest: The code for wp_title() is located with /wp-includes/general-template.php. This function performs two filters: wp_title_parts and wp_title, and in either instance you have the opportunity to manipulate the results of the standard wp_title(). Look at functions.php within the theme; the function twentytwelve_wp_title performs some ...


1

well that depends on what you want to do, but if it is easier for you to edit that template it will be better that you can control all the output of it.. fx like this function add_require_scripts_files() { wp_enqueue_style('layout', get_template_directory_uri().'/style.css', array(), '1.0.0', "all"); } add_action( 'wp_enqueue_scripts', ...


1

Let's look at where Twenty Twelve is enqueueing the stylesheet: function twentytwelve_scripts_styles() { global $wp_styles; /* * Adds JavaScript to pages with the comment form to support * sites with threaded comments (when in use). */ if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) ...


1

As recommended in a similar post: http://wordpress.stackexchange.com/a/156494/74343 1.) Create the menus as you want them, and name them as you like, as an example "mobile-menu" and "desktop-menu". 2.) In your child theme in the header.php you could switch according to the wp_is_mobile() flag like this: if ( wp_is_mobile() ) { wp_nav_menu( array( ...


1

According to http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates what you need to place at the top of the template file is <?php /* Template Name: My Template File */ ?> and then the template will show up in the Template drop down in Page Attributes meta box and you'll be able to select it. And, you should be working with a child ...


1

Impossible with get_sidebar(). From that function’s body: function get_sidebar( $name = null ) { do_action( 'get_sidebar', $name ); $templates = array(); if ( isset($name) ) $templates[] = "sidebar-{$name}.php"; $templates[] = 'sidebar.php'; So if you pass a $name or any other custom value to the function, they will be set ...


1

What I had done was in the WordPress Admin page, under Settings > General, I had put localhost/blog for the WordPress Address (URL). Changing this to the public URL of my site fixed the problem.



Only top voted, non community-wiki answers of a minimum length are eligible