jeni_8686
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Edited my theme = broken dashboard and site :(I’ve been able to edit this back to a basic theme so can at least get to my dashboard now, and have reverted to the ‘twentyten’ theme thanks to the instructions here: https://wp-ultra.com/2011/08/change-a-broke-wordpress-theme-using-phpmyadmin/
Thanks for offering to help though ??
Forum: Fixing WordPress
In reply to: Edited my theme = broken dashboard and site :(Header.php code is below
(line 51 is
if ( get_field( 'page_sidebar' ) == 'page_sidebar_on' || get_field('category_slider', 'category_' . get_query_var('cat') ) == 'cat_slider_on' && get_field('category_slider_position', 'category_' . get_query_var('cat') ) == 'cat_slider_above' && get_field( 'category_sidebar', 'category_' . get_query_var('cat') ) == 'cat_sidebar_on' ) { $with_sidebar = 'with-sidebar'; } else { $with_sidebar = ''; } ?>
which is apparently causing the fatal error.<?php /** * The Header for the theme * * @package SimpleMag * @since SimpleMag 1.4 **/ global $ti_option; // Fetch options stored in $ti_option; ?><!DOCTYPE html> <!--[if lt IE 9]><html <?php language_attributes(); ?> class="oldie"><![endif]--> <!--[if (gte IE 9) | !(IE)]><!--><html <?php language_attributes(); ?> class="modern"><!--<![endif]--> <head> <meta charset="<?php bloginfo('charset'); ?>" /> <title><?php if( ! is_home() ): wp_title( '|', true, 'right' ); endif; bloginfo( 'name' ); ?></title> <!-- Always force latest IE rendering engine & Chrome Frame --> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- Meta Viewport --> <meta name="viewport" content="width=device-width, initial-scale=1" /> <?php // Get the favicon if ( $ti_option['site_favicon'] != '' ) { $site_favicon = $ti_option['site_favicon']; } else { $site_favicon = get_template_directory_uri() . '/images/favicon.ico'; } ?> <link rel="shortcut icon" href="<?php echo $site_favicon; ?>" /> <?php // Get the retina favicon if ( $ti_option['site_retina_favicon'] != '' ) { $retina_favicon = $ti_option['site_retina_favicon']; } else { $retina_favicon = get_template_directory_uri() . '/images/retina-favicon.png'; } ?> <link rel="apple-touch-icon-precomposed" href="<?php echo $retina_favicon; ?>" /> <?php wp_head(); ?> </head> <?php if ( is_page() ) { $page_slug = 'page-'.$post->post_name; } else { $page_slug = ''; } if ( get_field( 'page_sidebar' ) == 'page_sidebar_on' || get_field('category_slider', 'category_' . get_query_var('cat') ) == 'cat_slider_on' && get_field('category_slider_position', 'category_' . get_query_var('cat') ) == 'cat_slider_above' && get_field( 'category_sidebar', 'category_' . get_query_var('cat') ) == 'cat_sidebar_on' ) { $with_sidebar = 'with-sidebar'; } else { $with_sidebar = ''; } ?> <body <?php body_class( $with_sidebar, $page_slug ); ?>> <div id="outer-wrap"> <div id="inner-wrap"> <div id="pageslide"> <a id="close-pageslide" href="#top"><i class="icon-remove-sign"></i></a> </div><!-- Sidebar in Mobile View --> <header id="masthead" role="banner" class="clearfix"> <div class="top-strip <?php echo $ti_option['site_top_strip_color']; if ( $ti_option['site_top_strip'] == 0 ) { echo ' hide-strip'; } ?>"> <div class="wrapper clearfix"> <?php get_search_form(); ?> <?php // Social Profiles if( $ti_option['top_social_profiles'] == 1 ) { get_template_part ( 'inc/social', 'profiles' ); } ?> <a id="open-pageslide" href="#pageslide"><i class="icon-menu"></i></a> <?php // Pages Menu if ( has_nav_menu( 'secondary_menu' ) ) : wp_nav_menu( array ( 'theme_location' => 'secondary_menu', 'container' => 'nav', 'container_class' => 'secondary-menu', 'menu_id' => 'secondary-nav', 'depth' => 2, 'fallback_cb' => false )); else: echo '<div class="alignleft no-margin message warning"><i class="icon-warning-sign"></i>' . __( 'Define your site secondary menu', 'themetext' ) . '</div>'; endif; ?> </div><!-- .wrapper --> </div><!-- .top-strip --> <div class="wrapper"> <div id="branding" class="animated"> <!-- Logo --> <?php // Get the logo if ( $ti_option['site_logo'] != '' ) { $site_logo = $ti_option['site_logo']; } else { $site_logo = get_template_directory_uri() . '/images/logo.png'; } ?> <a class="logo" href="<?php echo home_url( '/' ); ?>"> <img src="<?php echo $site_logo; ?>" alt="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>" title="<?php bloginfo( 'name' ); ?> - <?php bloginfo( 'description' ); ?>" /> </a> <!-- End Logo --> <?php // Show or Hide site tagline under the logo based on Theme Options if( $ti_option['site_tagline'] == 1 ) { ?> <span class="tagline"> <?php bloginfo( 'description' ); ?> </span> <?php } ?> </div> <?php // Main Menu if ( has_nav_menu( 'main_menu' ) ) : wp_nav_menu( array ( 'theme_location' => 'main_menu', 'container' => 'nav', 'container_class' => 'animated main-menu', 'menu_id' => 'main-nav', 'depth' => 2, 'fallback_cb' => false, 'walker' => new TI_Menu() )); else: echo '<div class="message warning"><i class="icon-warning-sign"></i>' . __( 'Define your site main menu', 'themetext' ) . '</div>'; endif; ?> </div><!-- .wrapper --> </header><!-- #masthead -->
Forum: Fixing WordPress
In reply to: Editing code to get a default post thumbnail imageHi,
Can anyone help me with this?
I now know how to only feature the top five posts with thumbnails to the top of the page, but how do I also stop it preventing posts without thumbnails from being published?
Forum: Fixing WordPress
In reply to: Editing code to get a default post thumbnail imageOne other point – when I did get the code working (although it was only for a few short minutes) it prevented the post (without a post_thumbnail value) from appearing at all, not just from the row of 5 thumbnails, but also from the main content section of the page?
Forum: Fixing WordPress
In reply to: Editing code to get a default post thumbnail imageOh no, i now accidentally deleted the first few lines of code so have broen my website and can’t easily access the previous version of my index.php code….!
Forum: Fixing WordPress
In reply to: Editing code to get a default post thumbnail imageThanks, I managed to work it out and it’s now fixed!
Forum: Fixing WordPress
In reply to: Editing code to get a default post thumbnail imageThanks for your quick reply. I added the “‘meta_key’ => ‘_thumbnail_id'” as you suggested but then my website wouldn’t load unfortunately.
I prefer your suggestion of only surfacing the most recent 5 posts with an image, but again I can’t make sense of the index.php code to edit this successfully myself!
Forum: Themes and Templates
In reply to: Pages and Category Links Not Working…Thanks Esmi, that has fixed the navigaton to older posts!
However clicking on the category links still doesn’t work, and I have just realised I don’t have a category.php file so will see what I can do.
Thanks again!
Forum: Themes and Templates
In reply to: Pages and Category Links Not Working…<?php query_posts('showposts=5'); ?>
This is all that I could find.
Do I need to edit it, or perhaps delete it?
Thanks.
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingI managed to download a plugin to remove the offending page list finally. So that problem is sorted!
So now the only issue is the older posts/page dilemma, and I will NOT edit any core files to fix it ??
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingWell I thought it would be as simple as adding the page numbers to the exclude function (as advised by another forum) but now I am not so sure!
https://realiventblog.com/2007/04/04/how-to-hide-pages-in-wordpress/ <– the page I got the advice from.
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingProblem fixed, but I am sure I need to edit the post-template.php in order to get rid of the irritating list.
After I nearly broke my website I am going to ask if someone else other than me can help me change the necessary code ??
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingAny way i can recover the 2.8.4 version of post-template.php??!
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingOh crap.. now my site’s not loading!
Forum: Themes and Templates
In reply to: ‘older posts’ / page links not workingMy header code is here, I can’t find the code mentioned above unfortunately – https://wordpress.pastebin.ca/1694498
I came across a site whic suggests editing my post-template.php in the wp-includes:
There’s a part here which has an option to exclude specific pages from a list –
function wp_list_pages($args = ”) {
$defaults = array(
‘depth’ => 0, ‘show_date’ => ”,
‘date_format’ => get_option(‘date_format’),
‘child_of’ => 0, ‘exclude’ => ”,
‘title_li’ => __(‘Pages’), ‘echo’ => 1,
‘authors’ => ”, ‘sort_column’ => ‘menu_order, post_title’,
‘link_before’ => ”, ‘link_after’ => ”The page numbers of about, CV and contact me are 2, 930 and 1373, so do I just put those into the ‘exclude’ section of the code?
Thanks for your help so far, I appreciate it!