Skip to main content

Home/ Wordpress/ Group items tagged function

Rss Feed Group items tagged

Vernon Fowler

Function Reference/wp register sidebar widget « WordPress Codex - 0 views

  •  
    "wp_register_sidebar_widget( 'your_widget_1', // your unique widget id 'Your Widget', // widget name 'your_widget_display', // callback function array( // options 'description' => 'Description of what your widget does' ) );"
Luciano Ferrer

Template Tags/register nav menu « WordPress Codex - 5 views

  •  
    "Registers a menu location to use with navigation menus. Even if you explicitly set theme support for navigation menus, this function must be in your theme's functions file for WordPress to recognize navigation menu support in your theme. "
Luciano Ferrer

widgets - Give Editor Access To Sidebar - WordPress Development Stack Exchange - 3 views

  •  
    "The edit_theme_options capability should allow the user to edit the sidebar as described on this page : http://codex.wordpress.org/Appearance_Widgets_SubPanel Code to add to functions.php $role = get_role('editor'); $role->add_cap('edit_theme_options'); Edit: This should work to prevent editor accessing themes or menus function custom_admin_menu() { $user = new WP_User(get_current_user_id()); if (!empty( $user->roles) && is_array($user->roles)) { foreach ($user->roles as $role) $role = $role; } if($role == "editor") { remove_submenu_page( 'themes.php', 'themes.php' ); remove_submenu_page( 'themes.php', 'nav-menus.php' ); } } add_action('admin_menu', 'custom_admin_menu'); I haven't had chance to test this, but it only removes them from the menu they may still be able to access them by typing in the URL directly."
Luciano Ferrer

Mostrar completo el editor de WordPress | Ayuda WordPress - 0 views

  •  
    "Para conseguirlo tienes que crear una función en tu plugin de utilidades o archivo functions.php y añadir el siguiente código: //Activar todos los botones del editor function todos_los_botones($buttons) { $buttons[] = 'fontselect'; //Selector de tipo de fuente $buttons[] = 'fontsizeselect'; //Selector de tamaño de fuente $buttons[] = 'styleselect'; //Selector de estilos de párrafo mucho más amplio $buttons[] = 'backcolor'; //Color de fondo de párrafo $buttons[] = 'newdocument'; //Nuevo documento inline $buttons[] = 'cut'; //Cortar texto $buttons[] = 'copy'; //Copiar texto $buttons[] = 'charmap'; //Mapa de caracteres $buttons[] = 'hr'; //Línea horizontal $buttons[] = 'visualaid'; //Ayudas visuales del editor return $buttons; } add_filter("mce_buttons_3", "todos_los_botones"); "
iFlair Web Technology

8 Amazing Benefits Of Choosing WordPress Development For Business Sites - 3 views

Since its inception and discovery, WordPress sites have gained immense popularity in the tech arena. Especially, when it comes to developing highly interactive websites, it's quite tough to find an...

WordPress Development Company WordPress Developers WordPress CMS Solutions Development

started by iFlair Web Technology on 08 Nov 16 no follow-up yet
Web Dorado

5 Ways WordPress Plugins Can Help to Improve Your Blog - 0 views

  •  
    If you're looking for plugins to improve specific areas on your blog, you can find 5 plugins in our post that are sure to make your blog function better.
  •  
    If you're looking for plugins to improve specific areas on your blog, you can find 5 plugins in our post that are sure to make your blog function better.
Vernon Fowler

Child Themes « WordPress Codex - 0 views

  • A child theme resides in its own directory in wp-content/themes. The scheme below shows the location of a child theme along with its parent theme (Twenty Twelve) in a typical WordPress directory structure:
  • This directory can contain as little as a style.css file, and as much as any full-fledged WordPress theme contains: style.css (required) functions.php (optional) Template files (optional) Other files (optional)
  • @import url("../twentytwelve/style.css");
  • ...4 more annotations...
  • Note on the @import rule There must be no other CSS rules above the @import rule. If you put other rules above it, it will be invalidated and the stylesheet of the parent will not be imported.
  • Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.)
  • But, when creating child themes, be aware that using add_theme_support('post-formats') will override the formats as defined by the parent theme, not add to it.
  • A child theme can override any parental template by simply using a file with the same name.
Vernon Fowler

Function Reference/get bloginfo « WordPress Codex - 0 views

  • Consider using get_template_directory_uri() instead (for the parent template directory) or get_stylesheet_directory_uri() (for the child template directory).
    • Vernon Fowler
       
      Using TwentyEleven as parent theme will make use of this for HTML5.js in header.php
Vernon Fowler

Function Reference/bloginfo « WordPress Codex - 0 views

  • 'siteurl' - Deprecated since version 2.2. Echo home_url(), or use bloginfo('url'). 'home' - Deprecated since version 2.2. Echo home_url(), or use bloginfo('url').
  • home = http://www.example.com/home (DEPRECATED! use url option instead)
  • Please note that directory URLs are missing trailing slashes.
  • ...1 more annotation...
  • siteurl = http://www.example.com/home (DEPRECATED! use url option instead)
  •  
    Displays information about your site, mostly gathered from the information you supply in your User Profile and General Settings WordPress Administration Screens. It can be used anywhere within a template file. This always prints a result to the browser. If you need the values for use in PHP, use get_bloginfo().
Fabian Herbel

How I used a WordPress Child Theme To Redesign My Blog - 0 views

  • First, Make a Functions.php File
    • Fabian Herbel
       
      It seems that the functions.php is the key to edit the php-files for theme design with plugins. More research is needed.
Andy Brudtkuhl

WordPress › Insights « WordPress Plugins - 0 views

  •  
    Insights brings a powerful new way to write your blog posts. It increases productivity and at the same time quality of your posts. Insights performs following functions in real-time: * Interlink your posts * Insert Flickr images * Insert Youtube videos * Search Wikipedia * Search Google * Search Google News * Google Blog Search * Google Book Search
  •  
    Insights brings a powerful new way to write your blog posts. It increases productivity and at the same time quality of your posts. Insights performs following functions in real-time: * Interlink your posts * Insert Flickr images * Insert Youtube videos * Search Wikipedia * Search Google * Search Google News * Google Blog Search * Google Book Search
Wanda Terral

WP First Aid | It's WordPress … anything is possible! - 0 views

shared by Wanda Terral on 03 Jul 11 - No Cached
  •  
    A while back I wrote an article about a function to generate a dynamic copyright to display in themes. Although I imagine the function can be adapted to be used elsewhere, the original intent was to place the function call in the footer of any given theme.
Vernon Fowler

WordPress › Support » Deprecated function: is_site_admin() - 0 views

  • is_site_admin() (p2/inc/p2.php:29) is deprecated in favor of is_super_admin()
Elías Gómez

Allow SVG through WordPress Media Uploader | CSS-Tricks - 0 views

  •  
    function cc_mime_types($mimes) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
    }
    add_filter('upload_mimes', 'cc_mime_types');
  •  
    function cc_mime_types($mimes) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
    }
    add_filter('upload_mimes', 'cc_mime_types');
Luciano Ferrer

Convertir fechas de PHP a castellano - 2 views

  •  
    "function fechaCastellano ($fecha) { $fecha = substr($fecha, 0, 10); $numeroDia = date('d', strtotime($fecha)); $dia = date('l', strtotime($fecha)); $mes = date('F', strtotime($fecha)); $anio = date('Y', strtotime($fecha)); $dias_ES = array("Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo"); $dias_EN = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"); $nombredia = str_replace($dias_EN, $dias_ES, $dia); $meses_ES = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"); $meses_EN = array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); $nombreMes = str_replace($meses_EN, $meses_ES, $mes); return $nombredia." ".$numeroDia." de ".$nombreMes." de ".$anio; }"
Luciano Ferrer

How to: Add shortcodes in sidebar Widgets - 1 views

  •  
    "To allow shortcodes in sidebar widgets, simply edit the functions.php file from your them and add the following code: add_filter('widget_text', 'do_shortcode');"
Luciano Ferrer

WordPress › Simple Image Sizes « WordPress Plugins - 1 views

  •  
    "This plugin allow create custom image sizes for your site. Override your theme sizes directly on the media option page. You can regenerate all the sizes you have just created and choose which one you wanted to regenerate. You can now get all the code to copy and paste to your function theme file. Now you can use the generated sizes directly into your posts and insert images at the right size ! Now you choose if you want display the size in the post insert image. Now you can regenerate the images one by one in the 'Medias' general pane. Now you can regenerate the images by bulk action in the 'Medias' general pane. Now you can regenerate the image sizes on single attachment edit page."
‹ Previous 21 - 40 of 157 Next › Last »
Showing 20 items per page