[WordPress]

Marco Luigia

Nuovo Utente
16 Mag 2014
28
0
1
Buongiorno a tutti.

Creando una tabella sul mio sito wordpress incorro nel problema che il cms mi aggiunge automaticamente dei
automaticamente vedi esempio:

http://www.friulisitiweb.it/esempio.gif

questo é il codice che genera WP, dopo che ho inserito la tabella:
HTML:
<table border="1" width="200"><br />
<tbody><br />
<tr><br />
<td></td><br />
<td></td><br />
<td></td><br />
</tr><br />
<tr><br />
<td></td><br />
<td></td><br />
<td></td><br />
</tr><br />
<tr><br />
<td></td><br />
<td></td><br />
<td></td><br />
</tr><br />
</tbody><br />
</table><br />

</div>

</p>

premetto che ho seguito diverse guide che mi dicevano di modificare il file functions.php, tipo:

http://sww.nz/solution-to-wordpress-adding-br-and-p-tags-around-shortcodes/



ma non ho risolto. dove sbaglio? dove va collocato il codice in functions.php.

codice functions.php
PHP:
<?php

/**

 * Yume functions and definitions

 *

 * @package Yume

 */


// Include Files

if ( ! function_exists( 'yume_require_files' ) ) :



function yume_require_files() {

   require( get_template_directory() . '/functions/widgets.php' );

   require( get_template_directory() . '/functions/head-css.php' );

}

endif;

add_action( 'after_setup_theme', 'yume_require_files' );



// Load Options Framework

if ( !function_exists( 'optionsframework_init' ) ) {

   define( 'OPTIONS_FRAMEWORK_DIRECTORY', esc_url(get_template_directory_uri() . '/inc/') );

   require( get_template_directory() . '/inc/options-framework.php' );

}



// Yume Setup



if ( ! function_exists( 'yume_setup' ) ) :

function yume_setup() {

    global $content_width;

   if ( ! isset( $content_width ) ) { $content_width = 960; }

   register_nav_menu( 'primary', __( 'Top Menu', "yume" ) );

   register_nav_menu( 'footer1', __( 'Fotter Menu 1', "yume" ) );

   register_nav_menu( 'footer2', __( 'Fotter Menu 2', "yume" ) );

   register_nav_menu( 'footer3', __( 'Fotter Menu 3', "yume" ) );

   register_nav_menu( 'footer4', __( 'Fotter Menu 4', "yume" ) );

   register_nav_menu( 'footer5', __( 'Fotter Menu 5', "yume" ) );

   add_theme_support( 'automatic-feed-links' );

   add_theme_support( 'post-thumbnails' );

   $custom_header_support = array(

       'default-text-color' => '000',

       'flex-height' => true,

   );

   set_post_thumbnail_size( 150, 150, true );

   add_image_size( 'large-feature', 600, 480, true );

   add_image_size( 'small-feature', 500, 300 );

   add_theme_support( 'custom-background');

   add_editor_style();

}

endif;

add_action( 'after_setup_theme', 'yume_setup' );



// Loading Files Javascript

if ( ! function_exists( 'yume_of_register_js' ) ) :

function yume_of_register_js() {

   wp_enqueue_script('main', get_template_directory_uri() . '/js/main.js', array('jquery'),'1.0', true);

   if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {

       wp_enqueue_script( 'comment-reply' );

   }

}

endif;

add_action('wp_enqueue_scripts', 'yume_of_register_js');



function yume_wp_title( $title, $sep ) {

   global $paged, $page;



   if ( is_feed() ) {

       return $title;

   }

 

   $title .= get_bloginfo( 'name', 'display' );



   $site_description = get_bloginfo( 'description', 'display' );

   if ( $site_description && ( is_home() || is_front_page() ) ) {

       $title = "$title $sep $site_description";

   }



   if ( $paged >= 2 || $page >= 2 ) {

       $title = "$title $sep " . sprintf( __( 'Page %s', 'yume' ), max( $paged, $page ) );

   }



   return $title;

}

add_filter( 'wp_title', 'yume_wp_title', 10, 2 );



// Yume Credits Footer

if ( ! function_exists( 'yume_credits' ) ) :

function yume_credits() {

   $text = 'Theme created by <a href="'.esc_url('http://www.pwtthemes.com/').'">PWT</a>. Powered by <a href="'.esc_url('http://wordpress.org/').'">WordPress.org</a>';

   echo apply_filters('yume_credits', $text);

}

endif;

add_action( 'yume_display_credits', 'yume_credits' );





// Extracting List Posts

if ( ! function_exists( 'yume_get_list_posts' ) ) :

function yume_get_list_posts() {

    global $wp_query;

   $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;

    $args = array(

        'post_type' => 'post',

        'orderby' => 'date',

       'order' => 'DESC',

       'paged' => $paged

    );

   $wp_query->query( $args );

   return new WP_Query($args);

}

endif;



// Extracting List Pages

if ( ! function_exists( 'yume_get_list_pages' ) ) :

function yume_get_list_pages() {

    global $wp_query;

    $args = array(

        'post_type' => 'page',

        'posts_per_page' => -1

    );

   $wp_query->query( $args );

    return new WP_Query( $args );

}

endif;



// Extracting Name Menu

if ( ! function_exists( 'yume_get_name_menu' ) ) :

function yume_get_name_menu($menu) {

   $yume_menu_locations = get_nav_menu_locations();

   $yume_menu_object = (isset($yume_menu_locations[$menu]) ? wp_get_nav_menu_object($yume_menu_locations[$menu]) : null);

   $yume_menu_name = (isset($yume_menu_object->name) ? $yume_menu_object->name : '');

   echo esc_html($yume_menu_name);

}

endif;



// Yume Position Sidebar

if ( ! function_exists( 'yume_position_sidebar' ) ) :

function yume_position_sidebar() {

   if(of_get_option('default_layout')=='right') {

      $text = 'right_sidebar';

   }

   if(of_get_option('default_layout')=='left') {

      $text = 'left_sidebar';

   }

   if(of_get_option('default_layout')=='none') {

      $text = 'nosidebar';

   }

   echo apply_filters('yume_position_sidebar', $text);

}

endif;

add_action( 'yume_display_ps', 'yume_position_sidebar' );



function comment_reform ($arg) {

$arg['title_reply'] = __('Lascia un commento');

return $arg;

}

add_filter('comment_form_defaults','comment_reform');



function change_footer_admin_text() {

    echo 'Il vostro testo';

}



add_filter('admin_footer_text', 'change_footer_admin_text');



// Pagenavi



   function kode_pagenavi( $p = 10 ) { // pagine da visualizzare prima e dopo la pagina corrente



   if ( is_singular() ) return;



   global $wp_query, $paged;



   $max_page = $wp_query->max_num_pages;



   if ( $max_page == 1 ) return;



   if ( empty( $paged ) ) $paged = 1;



   echo '<span class="meta-normal">Pagina &rarr; ' . $paged . ' di ' . $max_page . '</span>';



   if ( $paged > $p + 1 ) p_link( 1, 'Prima' );



   if ( $paged > $p + 2 ) echo '&larr;';



   for( $i = $paged - $p; $i <= $paged + $p; $i++ ) {



   if ( $i > 0 && $i <= $max_page ) $i == $paged ? print "<span class='page-numbers currentpage'>{$i}</span> " : p_link( $i );



   }



   if ( $paged < $max_page - $p - 1 ) echo '&rarr;';



   if ( $paged < $max_page - $p ) p_link( $max_page, 'Ultima' );



   }



   function p_link( $i, $title = '' ) {

   if ( $title == '' ) $title = "Pagina &rarr; {$i}";



   echo "<span class='page-numbers'><a href='", esc_html( get_pagenum_link( $i ) ), "' title='{$title}'>{$i}</a></span>";



   }

//

function add_meta_tag(){
    global $wp_query;
    $post = $wp_query->get_queried_object();

    $desc = get_bloginfo('description');
    $keys = "             ";

    if(is_single() || is_page()){
        $desc = cut($post->post_content, 25);
    }
    if(is_single()){
        $keywords = array();
        $tags = get_the_tags($post->ID);
        $categories = get_the_category($post->ID);
        if(is_array($tags)){
            foreach ($tags as $tag)
                $keywords[] = $tag->name;
        }
        if(is_array($categories)){
            foreach ($categories as $category)
                $keywords[] = $category->cat_name;
        }
        $keys = implode(", ", $keywords);
    }
    if(is_category()){
        $desc = strip_tags(category_description());
    }

    $desc = str_replace(array("\n","\r","\t"), " ", $desc);
    $desc = str_replace('"', "'", $desc);

    echo '<meta name="description" content="' . $desc . '" />' . "\n";
    echo '<meta name="keywords" content="'. $keys . '" />' . "\n";
}
add_action('wp_head', 'add_meta_tag');

function cut($content, $cut = 0, $encode_html = 0) {
    if ( $cut && !$encode_html )
        $encode_html = 2;
    if ( 1== $encode_html ) {
        $content = wp_specialchars($content);
        $cut = 0;
    } elseif ( 0 == $encode_html ) {
        $content = make_url_footnote($content);
    } elseif ( 2 == $encode_html ) {
        $content = strip_tags($content);
    }
    if ( $cut ) {
        $blah = explode(' ', $content);
        if ( count($blah) > $cut ) {
            $k = $cut;
            $use_dotdotdot = 1;
        } else {
            $k = count($blah);
            $use_dotdotdot = 0;
        }
        for ( $i=0; $i<$k; $i++ )
            $excerpt .= $blah[$i].' ';
        $excerpt .= ($use_dotdotdot) ? '...' : '';
        $content = $excerpt;
    }
    $content = str_replace(']]>', ']]&gt;',  $content);
    return $content;
}



?>



Vi prego aiutatemi grazie.
 
Ultima modifica:

Max 1

Super Moderatore
Membro dello Staff
SUPER MOD
MOD
29 Feb 2012
4.449
338
83
Quando posti del codice dei pregato di usare il tag [ code ] oppure l'opzione dalla barre degli strumenti
box inserisci 2.png.JPG
 
Discussioni simili
Autore Titolo Forum Risposte Data
matteoraggi Come cancellare le colonne di wordpress WordPress 0
glm2006ITALY Guida Il proprio sito WordPress è professionale? WordPress 0
R Plugin di base per WordPress WordPress 0
felino [Wordpress] Gallery con foto selezionabili dall'utente WordPress 0
Lino80 [Retribuito] Cerco programmatore php per modifica/inserimento funzione/valori da un plugin importer wordpress Offerte e Richieste di Lavoro e/o Collaborazione 0
R Dubbi su siti sviluppati con Wordpress e con codice WordPress 6
Z Cerco ecommerce gratuito meglio se realizzato con Woocommerce di Wordpress. E-Commerce 0
peppe0703 Come Estrarre dati da db wordpress e richiamarli in html esterno HTML e CSS 0
A WordPress e immagini Hosting 0
comunic_hiara Meglio Wordpress o Shopify? Guadagnare col Sito 1
S Sito Wordpress creato in localhost PHP 1
D Come estendere la tariffa per Wordpress con Visa? Hosting 1
J Devo scegliere Wordpress o Wix o Hostinger? Hosting 0
S Cerco Programmatore wordpress Offerte e Richieste di Lavoro e/o Collaborazione 0
Shyson Wordpress conta più messaggi di quelli che ci sono WordPress 1
S WORDPRESS NON FA INSTALLARE PIU NULLA WordPress 9
D Pagina non trovata Wordpress WordPress 7
Gabriele Visioli Differenza tra hosting e hosting WordPress Hosting 4
J Inserire blog wordpress in angular CMS (Content Management System) 0
H Hosting per Wordpress 2020 Hosting 5
C wordpress + woocommerce WordPress 4
S [Vendo] Sito Wordpress Altri Annunci 0
S [Vendo] PopcornTime Wordpress Clone Altri Annunci 0
P HTML integrazione wordpress HTML e CSS 0
Shyson Spostare filtro php di WordPress WordPress 0
Web93 CREARE SITO WEB COMICS CON WORDPRESS WordPress 0
A Cornici immagini per sito Web Wordpress WordPress 1
G sito wordpress da remoto a locale con xampp WordPress 2
atipika INSERIRE ICONE DOWNLOAD E STAMPA WORDPRESS WordPress 10
R Richiesta per sviluppo plugin Wordpress Offerte e Richieste di Lavoro e/o Collaborazione 9
gandalf1959 ricercare porzioni di codice da sito gestito con WordPress WordPress 11
L [CERCO] Creare blog su WordPress con tema Divi Offerte e Richieste di Lavoro e/o Collaborazione 3
M [Wordpress] Slider Revolution automatic link WordPress 0
felino [Wordpress] Modifica main color del template WordPress 8
felino [Wordpress] Sito web con codice malevolo WordPress 7
felino [Wordpress] Title dinamico per pagina WordPress 0
C Offro Installazione Wordpress Gratis! + Template Offerte e Richieste di Lavoro e/o Collaborazione 0
ecosito [WordPress] Polylang sballa il tema Avada WordPress 1
michele81 [WordPress] problemi plug meteo api key WordPress 4
M [WordPress] Redirect 301 WordPress 2
avalon95 [WordPress] Gestione database annunci WordPress 0
felino [Wordpress][WooCommerce] Ripristino ordini da file .sql WordPress 0
O Cerco grafico per sito wordpress Offerte e Richieste di Lavoro e/o Collaborazione 3
P [WordPress] Installazione plug in fallita WordPress 0
B [WordPress] Consigli per sito b&b WordPress 1
A [WordPress] Recuperare testo articoli da sito danneggiato WordPress 1
A [WordPress] Errore Plugin WordPress 0
P [WordPress] Messaggio di errore in file style.css WordPress 0
Y Esportare attributi taglia e colore fa Wordpress a Facebook E-Commerce 5
D [WordPress] Link eliminati ancora presenti nel database, è possibile? WordPress 0

Discussioni simili