Two questions - My front page is the only page that doesn’t work properly. I think the Jquery is causing the problems and I wanted it gone. The Jquery is the featured posts it was a slider. I deleted the Jquery files to make it return back to just posting it without it sliding. Now it just shows 3 featured posts before my content.
Platform - Wordpress.org
Templete - WordPress › Gemer « Free WordPress Themes
My question is how do I get rid of the 3 posts to just show the ten?
Site: http://fithope.com
Second question my images work fine on categories, but on the main page they don’t work for some reason.
Anyone know what’s wrong?
Site: same as above - main page
Example: » News - pictures work fine here for some reason and other categories, but not on main page.
I don’t even know what’s with it right now or where to start.
I found a fix that implements the correct code for the images, but now I have the problem of the featured news not disappearing. I’ve tried “0”, but that doesn’t seem to work. I can only get 1 to work which might force me to just keep it that way, but I would really like to just not have it there.
<?php
$settings = array(
'featured' => 'Featured',
'youtube' => 'Hovbx6rvBaA'
);
# Settings
$themename = "Gemer Theme";
$shortname = "gemer";
$options = array (
array( "name" => "Main Settings",
"type" => "header"
),
array( "name" => "Youtube Video ID",
"id" => $shortname."_youtube",
"std" => $settings['youtube'],
"type" => "text",
"note" => "<strong>Example: </strong> http://www.youtube.com/watch?v=<strong style='color: #ff0000;'>Hovbx6rvBaA</strong>")
);
function mytheme_add_admin() {
global $themename, $shortname, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'save' == $_REQUEST['action'] ) {
foreach ($options as $value) {
if ($value['type']!='header') {
update_option( $value['id'], $_REQUEST[ $value['id'] ] );
}
}
foreach ($options as $value) {
if( isset( $_REQUEST[ $value['id'] ] ) ) { update_option( $value['id'], $_REQUEST[ $value['id'] ] ); } else { delete_option( $value['id'] ); } }
header("Location: themes.php?page=settings.php&saved=true");
die;
} else if( 'reset' == $_REQUEST['action'] ) {
foreach ($options as $value) {
delete_option( $value['id'] ); }
header("Location: themes.php?page=settings.php&reset=true");
die;
}
}
add_theme_page($themename." Settings", "Theme Settings", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function mytheme_admin() {
global $themename, $shortname, $options;
if ( $_REQUEST['saved'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings saved.</strong></p></div>';
if ( $_REQUEST['reset'] ) echo '<div id="message" class="updated fade"><p><strong>'.$themename.' settings reset.</strong></p></div>';
?>
<style type="text/css">
th {
text-align: left;
}
td {
padding: 5px 10px !important;
}
tr.header {
background-color: #99CC66 !important;
color: #ffffff;
}
.header td {
padding: 2px 10px !important;
font-size: 14px !important;
font-weight: bold !important;
}
</style>
<div class="wrap">
<h2><?php echo $themename; ?> Settings</h2>
<form method="post">
<table class="form-table">
<?php foreach ($options as $value) {
if ($value['type'] == "text") { ?>
<tr>
<th scope="row" style="width: 25%"><?php echo $value['name']; ?>:</th>
<td>
<input onfocus="this.select();" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" type="<?php echo $value['type']; ?>" value="<?php if ( get_settings( $value['id'] ) != "") { echo get_settings( $value['id'] ); } else { echo $value['std']; } ?>" />
<?php echo $value['note']; ?>
</td>
</tr>
<?php } elseif ($value['type'] == "select") { ?>
<tr>
<th scope="row"><?php echo $value['name']; ?>:</th>
<td>
<select name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>">
<?php foreach ($value['options'] as $option) { ?>
<option value="<?php echo $option; ?>" <?php if ( get_settings( $value['id'] ) == $option) { echo ' selected="selected"'; } elseif ($option == $value['std']) { echo ' selected="selected"'; } ?>><?php echo $option; ?></option>
<?php } ?>
</select>
<?php echo $value['note']; ?>
</td>
</tr>
<?php
} elseif ($value['type'] == "header") {?>
<tr class="header"><td colspan="2"><?php echo $value['name'] ?> <span style="font-size: 11px; font-weight: normal;"><?php echo $value['note']; ?></span></td></tr>
<?php
}
}
?>
</table>
<p class="submit">
<input name="save" type="submit" value="Save changes" />
<input type="hidden" name="action" value="save" />
</p>
</form>
<form method="post">
<p class="submit" style="border: 0;">
<input name="reset" type="submit" value="Reset" />
<input type="hidden" name="action" value="reset" />
</p>
</form>
<?php
}
add_action('admin_menu', 'mytheme_add_admin');
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }
# Set Values
foreach ($settings as $k=>$v) {
$var = $shortname.'_'.$k;
if (!empty($$var)) $settings[$k] = $$var;
}
?>