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 ...


9

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.


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

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

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

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 ); } ...


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

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 ...


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

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.


1

/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 ...


1

You can use filters in custom functions to modify the default output of the comments form via your child themes functions file. Modify the comment form "Leave a reply" text. add_filter( 'comment_form_defaults', 'wpsites_modify_comment_form_title' ); function wpsites_modify_comment_form_title( $defaults ) { $defaults['title_reply'] = __( 'Leave a Comment' ...


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

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.


1

As @Michael points out, "comments_popup_link() prints the result, and can therefore not be used in a string concatenation" when returning output. There's a patch available, or you could use following workaround, something I wrote a while ago, adapted to your markup: if ( $global['sharing_label'] != '' ) { global $post; $comments_link_txt = ( ...


1

The unregister_sidebar takes the ID, not the name: <?php unregister_sidebar( $id ); ?> You'll need to do it like this: <?php function remove_some_widgets(){ unregister_sidebar( 'sidebar-1' ); unregister_sidebar( 'sidebar-2' ); unregister_sidebar( 'sidebar-3' ); } add_action( 'widgets_init', 'remove_some_widgets', 11 ); ?>


1

Adding the date is potentially as simple as inserting the_time() in the appropriate place in the template if you're editing the template files. However, it looks like you're using a child theme, so we have to use Wordpress's system of filters. To add the date to the post, try filtering the titles. Add this to your functions.php: function ...


1

This may only be part of the problem. That is quite a bit of code to read (and you should post relevant code inline so that the question is not dependent on an external site) and your description is a bit hard to follow, but... You should not be using a secondary query at all (I am pretty sure) and you certainly should not be using query_posts to do it. ...



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