For some reason when i try to put like a embeded video my video has slashes inside the code, but if I add it in the template itself then the code is fine i was told its "escaping quotes" anyhow this is what i have.
Functions file
<?php
add_action ( 'edit_category_form_fields', 'extra_category_fields');
function extra_category_fields( $tag ) { //check for existing featured ID
$t_id = $tag->term_id;
$cat_meta = get_option( "category_$t_id");
?>
<textarea name="Cat_meta[extra4]" id="Cat_meta[extra4]" style="width:60%;"><?php echo $cat_meta['extra4'] ? $cat_meta['extra4'] : ''; ?></textarea><br />
<span class="description"><?php _e('Video'); ?></span>
</td>
</tr>
<?php
}
add_action ( 'edited_category', 'save_extra_category_fileds');
function save_extra_category_fileds( $term_id ) {
if ( isset( $_POST['Cat_meta'] ) ) {
$t_id = $term_id;
$cat_meta = get_option( "category_$t_id");
$cat_keys = array_keys($_POST['Cat_meta']);
foreach ($cat_keys as $key){
if (isset($_POST['Cat_meta'][$key])){
$cat_meta[$key] = $_POST['Cat_meta'][$key];
}
}
update_option( "category_$t_id", $cat_meta );
}
}
?>
Template file
<center>
<?php
if (isset($cat_data['extra4'])){
echo $cat_data['extra4'];
}
?>
</center>
I can also post the embed code for the video im trying to post if that helps its pretty long though
Any help is greatly appreciated.
<div style="margin: 0 auto"></div>
or<div style="text-align:center"></div>
..or a CSS controlled equivalent.. (which you use depends on what you're trying to center)..