Risposte nei forum create
-
AutorePost
-
ZaRBoR2Partecipante
Faccio UP! Veramente mi serve qualcosa che include anche i database ( se è possibile, se no uso un altro plugin )
ZaRBoR2PartecipanteEcco che nuovamente ho trovato la soluzione da solo:
function member_check($atts, $content = null) {
if (is_user_logged_in() && !is_null($content) && !is_feed()) {
return $content;
} else {
return 'Spiacente, questa sezione è disponibile solo per i nostri membri.';
}
}
add_shortcode('member', 'member_check');
Per i posteri che possiedono lo stesso problema: Inserire questo codice in function.php ( del proprio tema ) e per rendere invisibile il testo a gli utenti non registrati usare: [member]testo solo per gli utenti registrati[/member]
Spero di essere stato utile! Nonostante abbiamo cercato nel forum, non ho trovato una soluzione adeguata alla mie esigenze… quindi mi è sembrato opportuno proporre la mia.
ZaRBoR2PartecipanteA dire il vero ho cercato in giro è ho trovato:
http://codex.wordpress.org/Function_Reference/is_user_logged_in
Però come lo integro al nome della pagine e al contenuto? ( visto che non posso usare il php… ) dovrei fare una modificare al template, ma si porrebbero sempre nuove domande, a me serve solo per una pagina…
ZaRBoR2PartecipanteMi rispondo da solo
http://wordpress.org/extend/plugins/wp-reportpost/
se trovate di meglio e magari in italiano fatemi sapere ^^
ZaRBoR2PartecipanteQuesto è effetto generalmente è dato da “Lightbox” cerca un plug in con questo nome… naturalmente ce ne sono vari sceglio quello + adatto alla tue esigenze
ZaRBoR2PartecipanteScusa SteveAgl mi sono espresso male, mi spiego meglio in modo che lei possa capire:
$content è il contenuto che sara visualizzata sotto il titolo dell’articolo ( RSS )
Quindi:
Titolo dell’articolo
Contenuto.
Quindi con questa operazione:
$content = ‘<p>’ . get_the_post_thumbnail($post->ID, ‘thumbnail’) .
‘</p>’ . get_the_content();
Otterremo:
Titolo dell’articolo
Contenuto
E all’interno di contenuto vi sarà :
thumbnail -> ( ovvero: get_the_post_thumbnail($post->ID, ‘thumbnail’) )
testo libero ( ovvero: get_the_content(); )
Comunque ho avuto nuove idee in questi giorni e devo fare dei test, questo articolo era solo a scopo illustrativo grazie, mi farò risentire e grazie.
ZaRBoR2Partecipantequello che scaturisce l’anomalia è “get_the_content();” con quale funzione posso risolvere…?
ZaRBoR2PartecipanteStranamente in questo codice c’è qualcosa che non va… gli rss me li vede come rss2…. in più non mi fa vedere nemmeno il footer del plug in…. consigli?
ZaRBoR2PartecipanteHo risolto mettendo questo codice in functions.php del mio tema… cosଠcome è adesso negli rss inserire la thumbail ( 150×150 generalmente )
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID, 'thumbnail') .
'</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
Se volete a dimensione originale basta inserire questo:
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID) .
'</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
ZaRBoR2PartecipanteMeglio che mi correggo, dopo aver fatto opportuni test, plug in funziona solo su rss di internet explorer, e poi l’immagine caricare è solo un link, e viene messo nel footer degli rss… quindi rss images non fa veramente al mio caso… l’immagine deve essere messa nell’header e deve essere visibile… grazie ancora steve vedi se puoi esaudire questo mio desiderio xd
-
AutorePost