Ik heb een wordpress site waar ik mee bezig ben (*spam*)
Nu heb ik een header die ik wil veranderen naar een flashfilmpje (swf)
Echter de plugin die ik geprobeerd hebt zou het moeten kunnen maar heeft 300 extra functies die ik niet gebruik en zit heel moeilijk met php. Nu kan ik in de HTML wel alles zo aanpassen dat ik een flashfilmpje krijg en een alternate afbeelding maar de HTML is nergens aan te passen. Want dat mag niet van wordpress...
De php-code voor de header is het volgende:
Ik ben alleen niet zo heel erg into PHP dus voor mij is dit ongeveer russisch/chinees.
De plugin die het kan (dynamic headers) geeft mij de volgende functie om deze code:
In de code hierboven te prakken, waar mag ik zelf uitzoeken. Dat zijn heel wat lines die ik moet testen. De instructie is overigens als volgt
Nu heb ik een header die ik wil veranderen naar een flashfilmpje (swf)
Echter de plugin die ik geprobeerd hebt zou het moeten kunnen maar heeft 300 extra functies die ik niet gebruik en zit heel moeilijk met php. Nu kan ik in de HTML wel alles zo aanpassen dat ik een flashfilmpje krijg en een alternate afbeelding maar de HTML is nergens aan te passen. Want dat mag niet van wordpress...
De php-code voor de header is het volgende:
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
| <?php /** * The xhtml1.0 transitional header for our theme. * * Displays all of the <head> section and everything up till <div id="bd"> * * @package WordPress * @subpackage Raindrops * @since Raindrops 0.1 */ global $current_blog; if(isset($current_blog)){ $this_blog = array("b". $current_blog->blog_id); }else{ $this_blog = array(); } ?><?php echo '<'.'?'.'xml version="1.0" encoding="'.get_bloginfo( 'charset' ).'"'.'?'.'>'."\n";?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes('xhtml'); ?>> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="content-type" content="<?php bloginfo('html_type');?>; charset=<?php bloginfo( 'charset' ); ?>" /> <meta http-equiv="content-script-type" content="text/javascript" /> <meta http-equiv="content-style-type" content="text/css" /> <title><?php /* * Print the <title> tag based on what is being viewed. */ global $page, $paged; wp_title( '|', true, 'right' ); // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) echo " | $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) echo ' | ' . sprintf( __( 'Page %s', 'raindrops' ), max( $paged, $page ) ); ?> </title> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> <?php if ( is_singular() && get_option( 'thread_comments' )){ wp_enqueue_script( 'comment-reply' ); } wp_head(); ?> </head> <body <?php body_class($this_blog); ?>> <div id="<?php echo raindrops_warehouse('raindrops_page_width'); ?>" class="<?php echo 'yui-'.raindrops_warehouse('raindrops_col_width'); ?> hfeed"> <div id="top"> <div id="hd"> <?php /** * Site description display position * * Site description diaplay at image when if header text Display Text value is yes. * Site description diaplay at header bar when if header text Display Text value is no. * * */ if ( 'blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) ){ $raindrops_pge_header = ''; $style = ' style="display:none;"'; }elseif(preg_match("|[0-9a-f]{6}|si",get_header_textcolor())){ $style = ' style="color:#' . get_header_textcolor() . ';"'; $raindrops_pge_header = ' style="display:none;"'; }else{ $style = ''; $raindrops_pge_header = ' style="display:none;"'; } /** * Conditional Switch html headding element * * * * */ if( is_home() or is_front_page() ){ $heading_elememt = 'h1'; }else{ $heading_elememt = 'div'; } $title_format = '<%s class="h1" id="site-title"><span><a href="%s" title="%s" rel="%s">%s</a></span></%s>'; printf( $title_format, $heading_elememt, home_url(), esc_attr(get_bloginfo( 'name', 'display' )), "home", get_bloginfo( 'name', 'display' ), $heading_elememt ); /** * Site description diaplay at header bar when if header text Display Text value is no. * * * * */ $raincrops_site_desctiption_html = '<div id="site-description" %s>%s</div>'; printf( $raincrops_site_desctiption_html, $raindrops_pge_header, get_bloginfo( 'description' ) ); ?> </div> <?php /** * header image * * * * */ $raindrops_header_image = get_header_image(); if( !empty($raindrops_header_image)){ ?> <div id="header-image" style="background-image:url(<?php echo $raindrops_header_image; ?>);height:<?php echo HEADER_IMAGE_HEIGHT;?>px;color:#<?php echo HEADER_TEXTCOLOR;?>;"><p <?php echo $style;?>><?php bloginfo( 'description' ); ?></p></div> <?php } /** * horizontal menubar * * * * */ ?> <div id="access"> <div class="skip-link screen-reader-text"><a href="#container" title="<?php esc_attr_e( 'Skip to content', 'raindrops' ); ?>"><?php _e( 'Skip to content', 'raindrops' ); ?></a></div> <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary')); ?> </div> <br class="clear" /> </div> <div id="bd" class="clearfix"> |
Ik ben alleen niet zo heel erg into PHP dus voor mij is dit ongeveer russisch/chinees.
De plugin die het kan (dynamic headers) geeft mij de volgende functie om deze code:
PHP:
1
| <?php if(function_exists('show_media_header')){ show_media_header(); } ?> |
In de code hierboven te prakken, waar mag ik zelf uitzoeken. Dat zijn heel wat lines die ik moet testen. De instructie is overigens als volgt
Option 1 (Recommended): Simply drop the this line of code into your theme file that controls your header (usually header.php)
Note: The location to add this code can vary widely from theme to theme and depending on your theme's css settings you may have to use Option 2 and modify the CSS of your theme **BACKUP ANY THEME FILES BEFORE MODIFYING**
<?php if(function_exists('show_media_header')){ show_media_header(); } ?>
This will automatically determine what type of media you are using and generate the appropriate code to insert it. No other coding is required on your part.
[ Voor 0% gewijzigd door MueR op 19-05-2011 00:39 ]
Overlever van KampeerMeet 4.1
"Als David Attenborough een film van jou zou moeten maken zou hij het moeilijk krijgen." - TDW