- Statut : non résolu
- Ce sujet contient 9 réponses, 2 participants et a été mis à jour pour la dernière fois par
baudry, le il y a 15 années et 2 mois.
-
AuteurMessages
-
9 septembre 2008 à 16 h 44 min #462864
Bonjour,
Ma configuration WP actuelle wordpress 2.62
– Version de WordPress : akismet
– Thème utilisé :
– Plugins en place :
– Nom de l’hebergeur : free.fr
– Adresse du site : http://olivierbaudrydesign.free.frProblème(s) rencontré(s) :
Voilà j’ai plusieurs pages sur mon sites et à chaque fois le problème est le même integer un style particulier
par example pour mon template logiciel.php corespondant à la page logiciel du site >http://wpglamour.com/themes/
et ainsi de suite pour chaque page du site comme videao _>http://webrevolutionary.com/sharpfolio-demo/
Or à chaque fois cela fait beaucoup de templates pour une apparence précise alors y a t’il une méthodologie pour faire tout ce que l’on veut?
9 septembre 2008 à 18 h 41 min #644966Parles tu de pages au sens wordpress ou d’articles ?
Tu peux t’en sortir avec des feuilles de styles additionnelles, mais il faut être un bon du css pour pouvoir gérer cela (avec des display-none…) et avec les conditions.
Cela dépend si tes templates sont seulement des mises en formes différentes, ou si il y a des zones différentes à afficher. Google n’aime pas les display none ou hidden.Bref, pour résumer :
Pour faire uniquement une présentation différente….
1. tu déclares dans ton header une feuille de style css supplémentaire qui aura pour nom l’identifiant de la page (et bien sûr tu n’oublies pas de la faire).
2. Cette feuille de style se charge automatiquement et modifie ou complète le css de baseSi il y a des zones à afficher ou pas, j’utiliserais les champs personnalisés.
Un champ par zone à afficher, et la valeur 0 ou 1 (ou true ou false, bref…)
Et ensuite dans le template, à chaque fois, un test sur la valeur du champ personnalisé avant de faire l’include ou de générer le code de la zone en question.17 septembre 2008 à 12 h 34 min #644967Je me pose la question suivante donc admettons que chacune des pages soit affilié à une apparence particulière
par exemple le theme dum-dum pour logiciel , le theme sharpfolio pour photo dans chacun des themes il y a un fichier functions.php comment faire cohabiter l’ensemble.17 septembre 2008 à 13 h 11 min #644968Bonjour,
parles tu de pages au sens de wordpress, ou de catégories ou d’articles ?
Sinon comme tu as un thème pour un blog, il te suffit de fusionner tous les fichiers functions.php en un seul.
17 septembre 2008 à 13 h 13 min #644969Merci fusionner tous les fichiers functions ok j’imagines de même pour archives.php et single.php,
Oui j’entends ce la en termes de page wordpress
17 septembre 2008 à 13 h 28 min #644970Donc voilà ce que donne mon fichier fonction.php maintenant
‘Box-1’,
‘before_widget’ => ‘<div class="box1"><div class="box1text">‘,
‘after_widget’ => ‘</div></div><!--/widget-->‘,
‘before_title’ => ‘<h2>‘,
‘after_title’ => ‘</h2>‘,
));
register_sidebar(array(
‘name’ => ‘Box-2’,
‘before_widget’ => ‘<div class="box2"><div class="box2text">‘,
‘after_widget’ => ‘</div></div><!--/widget-->‘,
‘before_title’ => ‘<h2>‘,
‘after_title’ => ‘</h2>‘,
));
register_sidebar(array(
‘name’ => ‘Box-3’,
‘before_widget’ => ‘<div class="box3"><div class="box3text">‘,
‘after_widget’ => ‘</div></div><!--/widget-->‘,
‘before_title’ => ‘<h2>‘,
‘after_title’ => ‘</h2>‘,
));
?>
<?php
// Theme Name: VideosResume
// Edit this file on your own risk!
add_action('admin_menu', 'portfolio_options'); // Theme Menu "Brightness Settings"
add_action('admin_head', 'portfolio_css'); // CSS For "Brightness Settings" Page
function pf_image($text) { preg_match("/[image](.+?)[/image](.*)/is", $text, $text2); echo $text2[1]; }
function pf_client($text) { preg_match("/[client](.+?)[/client](.*)/is", $text, $text2); if ($text2[1] !== NULL) { echo 'Client: <span>‘.$text2[1].’</span><br />‘; } }
function pf_company($text) { preg_match(« /[company](.+?)[/company](.*)/is », $text, $text2); if ($text2[1] !== NULL) { echo ‘Company: <span>‘.$text2[1].’</span><br />‘; } }
function pf_work($text) { preg_match(« /[work](.+?)[/work](.*)/is », $text, $text2); if ($text2[1] !== NULL) { echo ‘Work: <span>‘.$text2[1].’</span><br />‘; } }
function pf_uri($text) { preg_match(« /[link](.+?)[/link](.*)/is », $text, $text2); if ($text2[1] !== NULL) { echo ‘Link: <span>‘.$text2[1].’</span><br />‘; } }
function pf_description($text) { preg_match(« /[description](.+?)[/description](.*)/is », $text, $text2); if ($text2[1] !== NULL) { echo $text2[1] ; } }
function portfoliocategory() { // Display Category list on « Portfolio Theme Settings » Page
$fcat = wp_dropdown_categories(‘orderby=id&order=ASC&hide_empty=0&echo=0’);
$fcat = str_replace(« n », « », $fcat);
$fcat = str_replace(« t », « », $fcat);
$fcat = str_replace(« <option value="", "", $fcat);
$fcat = str_replace(" », « -« , $fcat);
$fcat = str_replace(« », « », $fcat);
echo « »;
$fcat = explode(« _ », $fcat);
foreach($fcat as $category)
{
$category = explode(« -« , $category);
$cat_number = $category[0];
$cat_name = $category[1];
echo « $cat_name id:$cat_number »;
} // End Foreach;
echo « »;
}
function portfolio(){ // Updates « Portfolio Theme Settings » Page Form
if(isset($_POST[‘submitted’]) && $_POST[‘submitted’] == « yes »){
//Get form data
$cvemailaddress = stripslashes($_POST[‘cvemailaddress’]);
$headquote = stripslashes($_POST[‘headquote’]);
$pflogo = stripslashes($_POST[‘pflogo’]);
$bgcolor = stripslashes($_POST[‘bgcolor’]);
$bgimage = stripslashes($_POST[‘bgimage’]);
$bgrepeat = stripslashes($_POST[‘bgrepeat’]);
$bgposition = stripslashes($_POST[‘bgposition’]);
$hqbgcolor = stripslashes($_POST[‘hqbgcolor’]);
$hqtxtcolor = stripslashes($_POST[‘hqtxtcolor’]);
$hqhlcolor = stripslashes($_POST[‘hqhlcolor’]);
$hqfontfamily = stripslashes($_POST[‘hqfontfamily’]);
$hqfontsize = stripslashes($_POST[‘hqfontsize’]);
$pfimgbordercolor = stripslashes($_POST[‘pfimgbordercolor’]);
$pftitlecolor = stripslashes($_POST[‘pftitlecolor’]);
$pftitlefontfamily = stripslashes($_POST[‘pftitlefontfamily’]);
$pftitlefontsize = stripslashes($_POST[‘pftitlefontsize’]);
$pftextcolor = stripslashes($_POST[‘pftextcolor’]);
$pfhltextcolor = stripslashes($_POST[‘pfhltextcolor’]);
$portfoliocategory = stripslashes($_POST[‘portfoliocategory’]);
$pffontfamily = stripslashes($_POST[‘pffontfamily’]);
$pfbottomborder = stripslashes($_POST[‘pfbottomborder’]);
$pftextsize = stripslashes($_POST[‘pftextsize’]);
$cvname = stripslashes($_POST[‘cvname’]);
$cvnationality = stripslashes($_POST[‘cvnationality’]);
$cvbirth = stripslashes($_POST[‘cvbirth’]);
$cvprimaryschool = stripslashes($_POST[‘cvprimaryschool’]);
$cvhighschool = stripslashes($_POST[‘cvhighschool’]);
$cvcollege = stripslashes($_POST[‘cvcollege’]);
$cvtraining = stripslashes($_POST[‘cvtraining’]);
$cvprimaryschool = stripslashes($_POST[‘cvprimaryschool’]);
$cvawards = stripslashes($_POST[‘cvawards’]);
$cvhomeaddress = stripslashes($_POST[‘cvhomeaddress’]);
$endword = stripslashes($_POST[‘endword’]);
$cvimage = stripslashes($_POST[‘cvimage’]);
$describe = stripslashes($_POST[‘describe’]);
$cvtelephone = stripslashes($_POST[‘cvtelephone’]);
$cvwork = stripslashes($_POST[‘cvwork’]);
$cvschool = stripslashes($_POST[‘cvschool’]);
$title = stripslashes($_POST[‘title’]);
update_option(« cvname », $cvname);
update_option(« title », $title);
update_option(« cvnationality », $cvnationality);
update_option(« cvbirth », $cvbirth);
update_option(« cvhighschool », $cvhighschool);
update_option(« cvcollege », $cvcollege);
update_option(« cvtraining », $cvtraining);
update_option(« cvprimaryschool », $cvprimaryschool);
update_option(« cvawards », $cvawards);
update_option(« pftextsize », $pftextsize);
update_option(« pfbottomborder », $pfbottomborder);
update_option(« pffontfamily », $pffontfamily);
update_option(« portfoliocategory », $portfoliocategory);
update_option(« headquote », $headquote);
update_option(« pflogo », $pflogo);
update_option(« bgcolor », $bgcolor);
update_option(« bgimage », $bgimage);
update_option(« bgrepeat », $bgrepeat);
update_option(« bgposition », $bgposition);
update_option(« hqbgcolor », $hqbgcolor);
update_option(« hqtxtcolor », $hqtxtcolor);
update_option(« hqhlcolor », $hqhlcolor);
update_option(« hqfontfamily », $hqfontfamily);
update_option(« hqfontsize », $hqfontsize);
update_option(« pfimgbordercolor », $pfimgbordercolor);
update_option(« pftitlecolor », $pftitlecolor);
update_option(« pftitlefontfamily », $pftitlefontfamily);
update_option(« pftitlefontsize », $pftitlefontsize);
update_option(« pftextcolor », $pftextcolor);
update_option(« pfhltextcolor », $pfhltextcolor);
update_option(« cvemailaddress », $cvemailaddress);
update_option(« cvhomeaddress », $cvhomeaddress);
update_option(« endword », $endword);
update_option(« cvimage », $cvimage);
update_option(« describe », $describe);
update_option(« cvtelephone », $cvtelephone);
update_option(« cvwork », $cvwork);
update_option(« cvschool », $cvschool);
echo « <div id="message" class="updated fade"><p><strong>Your settings have been saved.</strong></p></div>« ;
}
?>
<div class="wrap">
<form method="post" name="brightness" target="_self">
<h2>Portfolio Category:</h2>
<p>You have to put your work in a single category. Select it from your categories list.</p>
<table class="form-table">
<tr>
<th>
Portfolio Category:
</th>
<td>
</td>
</tr>
</table>
<div style="height: 15px;width: 100%"></div>
<h2>Head Quote</h2>
<p>Head Quote is the introductive paragraph displayed on the header of your website. (<a href="/images/help/headquote.jpg » alt= »HeadQuote » />see img</a>).
<table class="form-table">
<tr>
<th class="row">
Head Quote Text
</th>
<td>
<p style="margin: 0px 0px 5px 0px">
Use <strong></strong> for highlighted words.
</p>
<textarea name="headquote" cols="60" rows="7" id="headquote"></textarea>
</td>
</tr>
</table>
<div style="height: 15px;width: 100%"></div>
<h2>Theme Customization</h2>
<p>Here you can edit colors, images. Make your theme more unique!</p>
<table class="form-table">
<tr>
<th class="row">
Edit your logo!
</th>
<td>
<p style="margin: 0px 0px 5px 0px">
<strong>Image must have: 350px width / 150px height.</strong><br />
Enter the image url.
</p>
<input type="text" name="pflogo" value=" » />
</td>
</tr>
<tr>
<th class="row">
Edit your theme Colors!
</th>
<td>
<div class="themecolors">
<div>
<h3>Background Settings:</h3>
<p>Edit your background color, image, repeat and position.</p>
<div>
<strong>Background Color:</strong>
<input type="text" name="bgcolor" value=" » />
</div>
<div>
<strong>Background Image:</strong>
<input type="text" name="bgimage" value=" » />
</div>
<div>
<strong>Background Repeat:</strong>
<option value="no-repeat">no-repeat
<option value="repeat-x">repeat-x
<option value="repeat-y">repeat-y
</div>
<div>
<strong>Background Position:</strong>
<input type="text" name="bgposition" value=" » />
</div>
</div>
<div>
<h3>Headquote Settings:</h3>
<p>Edit your headquote background and colors:</p>
<div>
<strong>Headquote Background Color:</strong>
<input type="text" name="hqbgcolor" value=" » />
</div>
<div>
<strong>Headquote Text Color:</strong>
<input type="text" name="hqtxtcolor" value=" » />
</div>
<div>
<strong>Headquote Highlighted Text Color:</strong>
<input type="text" name="hqhlcolor" value=" » />
</div>
<div>
<strong>Headquote Font Family:</strong>
<input type="text" name="hqfontfamily" value=" » />
</div>
<div>
<strong>Headquote Font Size:</strong>
<input type="text" name="hqfontsize" value=" » />
</div>
</div>
<div>
<h3>Portfolio Items Settings:</h3>
<p>Edit portfolio image border, text colors and anything else.</p>
<div>
<strong>Portfolio Image Border Color:</strong>
<input type="text" name="pfimgbordercolor" value=" » />
</div>
<div>
<strong>Portfolio Title Color:</strong>
<input type="text" name="pftitlecolor" value=" » />
</div>
<div>
<strong>Portfolio Title Font Family:</strong>
<input type="text" name="pftitlefontfamily" value=" » />
</div>
<div>
<strong>Portfolio Title Font Size:</strong>
<input type="text" name="pftitlefontsize" value=" » />
</div>
<div>
<strong>Portfolio Text Font Family:</strong>
<input type="text" name="pffontfamily" value=" » />
</div>
<div>
<strong>Portfolio Text Color:</strong>
<input type="text" name="pftextcolor" value=" » />
</div>
<div>
<strong>Portfolio Text Size:</strong>
<input type="text" name="pftextsize" value=" » />
</div>
<div>
<strong>Portfolio Hightlighted Text Color:</strong>
<input type="text" name="pfhltextcolor" value=" » />
</div>
<div>
<strong>Portfolio Item Bottom Border:</strong>
<input type="text" name="pfbottomborder" value=" » />
</div>
</div>
</div>
</td>
</tr>
</table>
<div style="height: 15px;width: 100%"></div>
<h2>Curriculum Vitae</h2>
<p>You can add a Curriculum Vitae Page to your Portfolio Blog. Add you Information Here</p>
<table class="form-table">
<tr>
<th class="row">
About You!
</th>
<td>
<div class="themecolors">
<div>
<h3>General Info</h3>
<p>Your Name, Your Title, just basic info.</p>
<div>
<strong>Your Name:</strong>
<input type="text" name="cvname" value=" » />
</div>
<div>
<strong>Your Title:<br />(e.g.: « Freelance Web Designer, Lover, Football Player »)</strong>
<input type="text" name="title" value=" » />
</div>
<div>
<strong>Your Photo:<br />(320px width recommended)</strong>
<input type="text" name="cvimage" value=" » />
</div>
</div>
<div>
<h3>Describe yourself</h3>
<p>A short paragraph about yourself.</p>
<textarea name="describe" cols="52" rows="3"></textarea>
</div>
<div>
<h3>Personal Info</h3>
<p>Email, Telephone, Home Address..</p>
<div>
<strong>Email Address:</strong>
<input type="text" name="cvemailaddress" value=" » />
</div>
<div>
<strong>Home Address:</strong>
<input type="text" name="cvhomeaddress" value=" » />
</div>
<div>
<strong>Telephone:</strong>
<input type="text" name="cvtelephone" value=" » />
</div>
<div>
<strong>Nationality:</strong>
<input type="text" name="cvnationality" value=" » />
</div>
<div>
<strong>Date of Birth:</strong>
<input type="text" name="cvbirth" value=" » />
</div>
</div>
<div>
<h3>Education and Training</h3>
<p>School, Highschool, etc.</p>
<div>
<strong>Primary School(s):</strong>
<textarea name="cvschool" cols="50" rows="3"></textarea>
</div>
<div>
<strong>High Schools(s):</strong>
<textarea name="cvhighschool" cols="50" rows="3"></textarea>
</div>
<div>
<strong>College:</strong>
<textarea name="cvcollege" cols="50" rows="3"></textarea>
</div>
<div>
<strong>Special Training:</strong>
<textarea name="cvtraining" cols="50" rows="3"></textarea>
</div>
</div>
<div>
<h3>Work Experience</h3>
<p>Where and for how long you have worked.</p>
<textarea name="cvwork" cols="52" rows="3"></textarea>
</div>
<div>
<h3>Awards</h3>
<p>Oscars, Grammies, you know, regular stuff.</p>
<textarea name="cvawards" cols="52" rows="3"></textarea>
</div>
<div>
<h3>Ending Word</h3>
<p>Something sweet for your clients.</p>
<textarea name="endword" cols="52" rows="3"></textarea>
</div>
</div>
</td>
</tr>
</table>
<p class="submit">
</p>
</form>
<table class="form-table">
<tr>
<th class="row">
Donate! Help olivierbaudrydesign.free.fr!
</th>
<td>
<p style="margin: 0px">Brightness Theme is FREE! Help olivierbaudrydesisign is free to stay alive and provide more and more free stuff!</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form></p>
</td>
</tr>
</table>
</div>
<?php
}
function portfolio_options() { // Adds Dashboard Menu Item
add_menu_page('Portfolio Theme Settings', 'Portfolio Theme Settings', 'edit_themes', __FILE__, 'portfolio');
}
function portfolio_css() { // Adds Dashboard Head Style
echo "
.themecolors div { display: block; background: #ffffff; padding: 15px; margin-bottom: 10px;}
.themecolors div div { padding: 0px 0px 0px 10px; border-left: solid 4px #CCD9E3; padding-bottom: 15px; }
.themecolors div div strong { display: block; }
.themecolors div h3 { margin: 0px 0px 0px 0px; font-size: 20px; }
.themecolors div p { margin: 3px 0px 20px 0px; }
« ;
}
?>17 septembre 2008 à 13 h 37 min #644971Si tu parles de pages WordPress, il n’y a aucun besoin de toucher à archives
Et il ne faut pas fusionner single, il faut faire plusieurs template de pages17 septembre 2008 à 13 h 39 min #644972Donc je peux supprimer le fichier single .php dans mon cas.
18 septembre 2008 à 5 h 38 min #644973Si tu supprimes le fichier single.php tu auras peut être des surprises en affichant les articles seuls qui ne sont pas des pages.
Sauf évidemment si tu n’as aucun article…22 septembre 2008 à 13 h 36 min #644974Suite au dernier messages je rencontre un petit soucis voilà comme j’ai en gros un header commun à tous mais quelques css de plus sur certains je me pose une questions ou mettre le dans mon fichier header.php ou dans le template de la page
ce qui donne quelque chose comme
<html xmlns="http://www.w3.org/1999/xhtml">
<meta name="Description" content=" » />
<title></title>
<meta name="generator" content="WordPress » /> <!-- leave this for stats please -->
<link rel="stylesheet" href="/menu.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/common.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/links.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/lists.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/blog.css » type= »text/css » media= »screen » />
<link rel="Shortcut Icon" href=";/wp-content/themes/oupocreanum/images/favicon.ico » type= »image/x-icon » />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href=" » />
<link rel="alternate" type="text/xml" title="RSS .92" href=" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href=" » />
<link rel="pingback" href="/>
<!--
var podPressBackendURL = "http://olivierbaudrydesign.free.fr/wp-content/plugins/podpress/";
var podPressText_PlayNow = "Play Now";
var podPressText_HidePlayer = "Hide Player";
// -->
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
<!-- end header -->puis par example dans le template de page avoir ceci:
<link rel="stylesheet" href="/publicationblog.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/publicationprint.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/publicationstyle.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/publicationlayout.css » type= »text/css » media= »screen » />
<link rel="stylesheet" href="/menu.css » type= »text/css » media= »screen » />
<link rel="Shortcut Icon" href="/wp-content/themes/oupocreanum/images/favicon.ico » type= »image/x-icon » />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href=" » />
<link rel="alternate" type="text/xml" title="RSS .92" href=" » />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href=" » />
<div id="blog"><!-- begin blog -->
<div id="content">
<div id="twitter_div"><!-- begin twitter -->
<h2 class="twitter-title">Twitter<br></h2>
</div>
<!-- stop twitter -->
<div id="dopplr-blog-badge">
</div>
<h1 id="header"><a href=" »></a></h1>
<?php the_date('','<h2>‘,’</h2>‘); ?>
<div class="post »>
<br>
<p><h3 class="storytitle"><a href=" » rel= »bookmark » ></a></h3></p>
<br>
<p><div class="meta">
| In — @ @ |
</div></p>
<p><div class="storycontent">
</div></p>
<div class="feedback">
<?php link_pages('<p><strong>Pages:</strong> ‘, ‘</p>‘, ‘number’); ?>
</div>
<!–
–>
</div>
<h2 class="center">Not Found</h2>
<p></p>
<?php posts_nav_link('before=<p>&next_or_number=next’.’&nextpagelink= « next page » »&previouspagelink= « « previous page » ‘); ?>
</div>Je me pose cette question car j’ai essayé de valider le code dans avec le W3C qui d’ailleurs ne le valide que si je je supprime les < devant ?php.
-
AuteurMessages
- Le forum ‘Utilisation spécifique de WordPress’ est fermé à de nouveaux sujets et réponses.