Title: Problema no Functions.php
Last modified: 6 agosto, 2016

---

# Problema no Functions.php

 *  [Bruna Pazzini Sestari](https://br.wordpress.org/support/users/bruna-pazzini-sestari/)
 * (@bruna-pazzini-sestari)
 * [13 anos, 9 meses atrás](https://br.wordpress.org/support/topic/problema-no-functionsphp/)
 * Ontem fui fazer uma modificação no meu site, mas acabei colocando algo errado
   no functions.php. Aparece a seguinte mensagem quando abro o site: Parse error:
   syntax error, unexpected ‘:’ in /home/dhenr137/public_html/wp-includes/functions.
   php on line 114
    Sou nova nesse ramo e gostaria de saber se há algo de errado
   no código:
 * > <?php
   > include ‘lib/theme_options.php’;
   >  include ‘lib/guide.php’; include ‘lib/post-
   > types.php’; include ‘lib/metabox.php’;
   > /* SIDEBARS */
   >  if ( function_exists(‘register_sidebar’) )
   >  register_sidebar(array(
   >  ‘name’ => ‘Sidebar’, ‘before_widget’ => ‘<li class
   > =”sidebox %2$s”>’, ‘after_widget’ => ”, ‘before_title’ => ‘<h3 class=”sidetitl“
   > >’, ‘after_title’ => ‘</h3>’,
   >  ));
   >  register_sidebar(array(
   >  ‘name’ => ‘Footer’, ‘before_widget’ => ‘<li class
   > =”botwid”>’, ‘after_widget’ => ”, ‘before_title’ => ‘<h3 class=”bothead”>’,‘
   > after_title’ => ‘</h3>’, ));
   > /* CUSTOM MENUS */
   > register_nav_menus( array(
   >  ‘primary’ => __( ‘Primary Navigation’, ” ), ) );
   > function fallbackmenu(){ ?>
   >  <div id=”submenu”>
    -  Go to Adminpanel > Appearance > Menus to create your menu. You should have
      WP 3.0+ version for custom menus to work.
 *  </div>
    <?php }
 * /* ADD RECIPES TO RSS FEED */
 * /* CUSTOM EXCERPTS */
 * function wpe_excerptlength_slide($length) {
    return 15; } function wpe_excerptlength_recipe(
   $length) { return 35; } function wpe_excerptlength_index($length) { return 50;}
 * function wpe_excerpt($length_callback=”, $more_callback=”) {
    global $post; if(
   function_exists($length_callback)){ add_filter(‘excerpt_length’, $length_callback);}
   if(function_exists($more_callback)){ add_filter(‘excerpt_more’, $more_callback);}
   $output = get_the_excerpt(); $output = apply_filters(‘wptexturize’, $output);
   $output = apply_filters(‘convert_chars’, $output); $output = ‘<p>’.$output.'</
   p>’; echo $output; }
 * function new_excerpt_more($more) {
    return ‘
 * ‘;
    } add_filter(‘excerpt_more’, ‘new_excerpt_more’);
 * /* SHORT TITLES */
 * function short_title($after = ”, $length) {
    $mytitle = explode(‘ ‘, get_the_title(),
   $length); if (count($mytitle)>=$length) { array_pop($mytitle); $mytitle = implode(”“,
   $mytitle). $after; } else { $mytitle = implode(” “,$mytitle); } return $mytitle;}
 * /* FEATURED THUMBNAILS */
 * if ( function_exists( ‘add_theme_support’ ) ) { // Added in 2.9
    add_theme_support(‘
   post-thumbnails’ );
 * }
 * /* GET THUMBNAIL URL */
 * function get_image_url(){
    $image_id = get_post_thumbnail_id(); $image_url = 
   wp_get_attachment_image_src($image_id,’large’); $image_url = $image_url[0]; echo
   $image_url; }
 * /* PAGE NAVIGATION */
 *  padding:0px 5px 0px 5px;
    margin: 5px 3px 5px 3px; font-weight:normal; background:#
   CCCCCD;
 * function getpagenavi(){
    ?> <div id=”navigation”> <?php if(function_exists(‘wp_pagenavi’)):?
   > <?php wp_pagenavi() ?> <?php else : ?> <div class=”alignleft”><?php next_posts_link(
   __(‘« Posts Antigos’,’arclite’)) ?></div> <div class=”alignright”><?php previous_posts_link(
   __(‘Posts Novos »’,’arclite’)) ?></div> <div class=”clear”></div> <?php endif;?
   >
 * </div>
 * <?php
    }
 * function mytheme_add_init() {
    $file_dir=get_bloginfo(‘template_directory’); 
   wp_enqueue_style(“mce”, $file_dir.”/lib/mce.css”, false, “1.0”, “all”); } add_action(‘
   admin_init’, ‘mytheme_add_init’);
 * /* Adding a Taxonomy Filter to Admin List for a Custom Post Type*/
 * add_action( ‘restrict_manage_posts’, ‘my_restrict_manage_posts’ );
    function 
   my_restrict_manage_posts() {
 *  // only display these taxonomy filters on desired custom post_type listings
   
   global $typenow; if ($typenow == ‘recipes’) {
 *  // create an array of taxonomy slugs you want to filter by – if you want to 
   retrieve all taxonomies, could use get_taxonomies() to build the list
    $filters
   = array(‘cuisine’, ‘meal’,’food’);
 *  foreach ($filters as $tax_slug) {
    // retrieve the taxonomy object $tax_obj 
   = get_taxonomy($tax_slug); $tax_name = $tax_obj->labels->name;
 *  // output html for taxonomy dropdown filter
    echo “<select name=’$tax_slug’ 
   id=’$tax_slug’ class=’postform’>”; echo “<option value=”>Show All $tax_name</
   option>”; generate_taxonomy_options($tax_slug,0,0); echo “</select>”; } } }
 * function generate_taxonomy_options($tax_slug, $parent = ”, $level = 0) {
    $args
   = array(‘show_empty’ => 1); if(!is_null($parent)) { $args = array(‘parent’ =>
   $parent); } $terms = get_terms($tax_slug,$args); $tab=”; for($i=0;$i<$level;$
   i++){ $tab.=’–‘; } foreach ($terms as $term) { // output each select option line,
   check against the last $_GET to show the current option selected echo ‘<option
   value=’. $term->slug, $_GET[$tax_slug] == $term->slug ? ‘ selected=”selected”‘:”,’
   >’ .$tab. $term->name .’ (‘ . $term->count .’)</option>’; generate_taxonomy_options(
   $tax_slug, $term->term_id, $level+1); }
 * }
 * ?>

Visualizando 2 respostas - 1 até 2 (de um total de 2)

 *  [Thiago Senna](https://br.wordpress.org/support/users/trsenna/)
 * (@trsenna)
 * [13 anos, 9 meses atrás](https://br.wordpress.org/support/topic/problema-no-functionsphp/#post-26572)
 * Vc não lembra exatamente que linhas alterou? Mande apenas o trecho que você alterou,
   ou o pedaco do codigo próximos a linha 114. Aqui pelo fórum está ruim de procurar
   o erro no código.
 *  [Thiago Senna](https://br.wordpress.org/support/users/trsenna/)
 * (@trsenna)
 * [13 anos, 9 meses atrás](https://br.wordpress.org/support/topic/problema-no-functionsphp/#post-26573)
 * Acho que achei o erro…
 * você escreveu código css no seu functions PHP. O local correto para escrever 
   o CSS é dentro de arquivos que terminem com a extensao *.css.
 * Remova o seguinte trecho do seu código (mais ou menos da linha 104 até 109):
 * /* PAGE NAVIGATION */
 * padding:0px 5px 0px 5px;
    margin: 5px 3px 5px 3px; font-weight:normal; background:#
   CCCCCD;
 * Depois coloque este código que eu pedi para remover no final do arquivo style.
   css. Creio que isto seja suficiente.

Visualizando 2 respostas - 1 até 2 (de um total de 2)

 O tópico ‘Problema no Functions.php’ está fechado para novas respostas.

## Tags

 * [function](https://br.wordpress.org/support/topic-tag/function/)
 * [php](https://br.wordpress.org/support/topic-tag/php/)

 * Em: [Plugins](https://br.wordpress.org/support/forum/plugins-e-codigos/)
 * 2 respostas
 * 2 participantes
 * Última resposta de: [Thiago Senna](https://br.wordpress.org/support/users/trsenna/)
 * Última atividade: [13 anos, 9 meses atrás](https://br.wordpress.org/support/topic/problema-no-functionsphp/#post-26573)
 * Estado: não resolvido

## Tópicos

### Tópicos mais populares

### Tópicos sem respostas

### Tópicos não relacionados a suporte

### Tópicos resolvidos

### Tópicos não resolvidos

### Todos os tópicos
