Risultati della ricerca per 'Wordpress custom script'
-
-
Ciao, ho questo codice che funziona ma purtroppo mi ristringe l’immagine..
Come posso fare?
ecco il codice:function my_login_logo() { ?> <style type="text/css"> #login h1 a, .login h1 a { background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/logo.jpg); color: #999; height: 150px; font-size: 20px; font-weight: normal; line-height: 1.3em; margin: 0 auto 25px; padding: 0; text-decoration: none; width: 300px; text-indent: -9999px; outline: none; overflow: hidden; display: block; } </style> <?php } add_action( 'login_enqueue_scripts', 'my_login_logo' );Ho letto questa pagina:
https://codex.wordpress.org/Customizing_the_Login_FormNon vorrei utilizzare plugin di terze parti.
Ho provato ad reagire con il codice css:
height: 150px;
width: 300px;ma me la mette piccolina anche se gli ho dato le dimensioni giuste.
avete idea come fare?
Vi ringrazio e buona settimana.
-
Buon giorno a tutti,
premesso che non so molto di PHP vi espongo il mio problema:
sto finendo di modificare un blog in WordPress per mia moglie, l’ ultima cosa che mi manca di fare è creare un estratto degli articoli con lo stesso numero di caratteri, non di parole perchè l’ anteprima non viene precisa, quindi pensavo al conteggio delle lettere cosi da permettere una visualizzazione omogenea (tutti gli estratti delle stesse dimensioni), ho provato mille funzioni da mettere nel file function.php ma tutte quelle che ho provato, anche quelle che dicevano di contare i caratteri contano le parole, al momento uso questa funzione:
function wpse_allowedtags() { // Add custom tags to this string return '<script>,<style>,<br>,<pre>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>,<img>,<video>,<audio>'; } if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) : function wpse_custom_wp_trim_excerpt($wpse_excerpt) { global $post; $raw_excerpt = $wpse_excerpt; if ( '' == $wpse_excerpt ) { $wpse_excerpt = get_the_content(''); $wpse_excerpt = strip_shortcodes( $wpse_excerpt ); $wpse_excerpt = apply_filters('the_content', $wpse_excerpt); $wpse_excerpt = str_replace(']]>', ']]>', $wpse_excerpt); $wpse_excerpt = strip_tags($wpse_excerpt, wpse_allowedtags()); /*IF you need to allow just certain tags. Delete if all tags are allowed */ //Set the excerpt word count and only break after sentence is complete. $excerpt_word_count = 15; $excerpt_length = apply_filters('excerpt_length', $excerpt_word_count); $tokens = array(); $excerptOutput = ''; $count = 0; // Divide the string into tokens; HTML tags, or words, followed by any whitespace preg_match_all('/(<[^>]+>|[^<>\s]+)\s*/u', $wpse_excerpt, $tokens); foreach ($tokens[0] as $token) { if ($count >= $excerpt_word_count && preg_match('/[\,\;\?\.\!]\s*$/uS', $token)) { // Limit reached, continue until , ; ? . or ! occur at the end $excerptOutput .= trim($token); break; } // Add words to complete sentence $count++; // Append what's left of the token $excerptOutput .= $token; } $wpse_excerpt = trim(force_balance_tags($excerptOutput)); $excerpt_end = '... <br/><br/> <a style="font-family: Merriweather, Georgia, serif; font-size: 0.75rem; text-transform: uppercase;" href="'. esc_url( get_permalink() ) . '">' . '' . sprintf(__( 'Read more: %s ', 'wpse' ), get_the_title()) . '</a>'; $excerpt_more = apply_filters('excerpt_more', ' ' . $excerpt_end); $pos = strrpos($wpse_excerpt, '</'); if ($pos !== false) // Inside last HTML tag $wpse_excerpt = substr_replace($wpse_excerpt, $excerpt_end, $pos, 0); /* Add read more next to last word */ //else // After the content //$wpse_excerpt .= $excerpt_end; /*Add read more in new paragraph */ return $wpse_excerpt; } return apply_filters('wpse_custom_wp_trim_excerpt', $wpse_excerpt, $raw_excerpt); } endif; remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'wpse_custom_wp_trim_excerpt');che oltre a contare le parole mantiene la formattazione e mantiene parole intere.
C’è una possibilità di fare quello che cerco mantenendo la funzione? O comunque una funzione che fa tutto quello che cerco ?
Grazie a tutti in anticipo
P.s. Dimenticavo Uso WordPress 4.6, il tema modificato è twenty sixteen, non vorrei usare Plugin.
il sito dove faccio tutte le modifiche è http://etherealprove.altervista.org/
-
Ciao ragazzi, sto seguendo questo tutorial [modificato perché informazione promozionale] per aggiungere una sezione portfolio a TwentyFourteen, ma ho alcuni dubbi sui file da creare.
Le funzioni createCustomPostType, insertScripts e portfolioShortcode le vado a inserire in un file php che sarà il plugin di cui faccio l’upload in wordpress?
Il seguente codice dove lo devo mettere invece?
Grazie infinite!!
-
Buongiorno a tutti,
vorrei chiedervi un aiuto, ho un tema wordpress responsive, e nella versione mobile il menu ha uno stile che non mi piace e vorrei cambiarlo. tramite plugin non ho nessun problema ad aggiungere il menu che mi piace il problema è che rimane quello originale.
leggendo in rete ho visto (non so se è giusto) che dovrei agire sul css del menu e aggiungere l’opzione: .block_menu
il problema è che non trovo il css che definisce il mio menu nella versione mobile, ne saprei come agire sul css senza fare casini, potete aiutarmi?
Grazievia allego le categorie del mio thema, sia il figlio che il genitore (cherry):
GENITORE
• Template 404
(404.php)
• accordion.php
• options-framework.php
• options-interface.php
• options-medialibrary-uploader.php
• options-sanitize.php
• Archivi
(archive.php)
• Template autore
(author.php)
• Template categorie
(category.php)
• Commenti
(comments.php)
• filterable-portfolio-loop.php
• Pié di pagina
(footer.php)
• framework_options.php
• Funzioni del tema
(functions.php)
• Testata
(header.php)
• aq_resizer.php
• class-tgm-plugin-activation.php
• class.wp-help-pointers.php
• custom-function.php
• less-compile.php
• lessc.inc.php
• live-chat.php
• locals.php
• register-motopress.php
• register-plugins.php
• sidebar-init.php
• theme-function.php
• theme-init.php
• theme-pagemeta.php
• theme-portfoliometa.php
• theme-postmeta.php
• theme-scripts.php
• theme-slidermeta.php
• theme-teammeta.php
• theme-testimeta.php
• voting.php
• Pagina principale
(index.php)
• loop-archives.php
• loop-author.php
• loop-blog.php
• loop-faq.php
• loop-page.php
• loop-portfolio2.php
• loop-portfolio3.php
• loop-portfolio4.php
• loop-single-portfolio.php
• loop-single-team.php
• loop-single-testi.php
• loop-single.php
• loop-testi.php
• options.php
• Filter Folio 2 cols template di pagina
(page-Portfolio2Cols-filterable.php)
• Filter Folio 3 cols template di pagina
(page-Portfolio3Cols-filterable.php)
• Filter Folio 4 cols template di pagina
(page-Portfolio4Cols-filterable.php)
• Archives template di pagina
(page-archives.php)
• FAQs template di pagina
(page-faq.php)
• Fullwidth Page template di pagina
(page-fullwidth.php)
• Home Page template di pagina
(page-home.php)
• Testimonials template di pagina
(page-testi.php)
• Template pagine
(page.php)
• portfolio-loop.php
• Risultati della ricerca
(search.php)
• Modulo di ricerca
(searchform.php)
• Barra laterale
(sidebar.php)
• single-portfolio.php
• single-team.php
• single-testi.php
• Articolo singolo
(single.php)
• slider.php
• static-404.php
• static-footer-nav.php
• static-footer-text.php
• static-logo.php
• static-nav.php
• static-not-found.php
• static-search.php
• static-slider.php
• static-title.php
• Template tag
(tag.php)
• title.php
• wrapper-footer.php
• wrapper-header.php
Stili
• Foglio di stile
(style.css)
• Editor visuale RTL foglio di stile
(editor-style-rtl.css)
• Editor visuale foglio di stile
(editor-style.css)
• Foglio di stile RTL
(rtl.css)FIGLIO
• custom-function.php
• custom-js.php
• register-plugins.php
• sidebar-init.php
• theme-init.php
• options.php
• Home Page template di pagina
(page-home.php)
• parallaxSlider.php
• static-footer-text.php
• wrapper-footer.php
• wrapper-header.php
Stili
• Foglio di stile
(style.css)
• main-style.css
• Foglio di stile RTL
(rtl.css)
-