BennoH
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Parent Pages and Drop Down MenusIt appears that the site does re-direct to the correct link as the correct link comes up in the navi bar. However, the image/page on screen is still the homepage.
Forum: Fixing WordPress
In reply to: CategoriesBrilliant, thank you very much!
Forum: Fixing WordPress
In reply to: Inserting an image to the homepageThis is the code from my functions.php
<?php // theme admin include('functions/theme-admin.php'); include('functions/better-excerpts.php'); include('functions/better-comments.php'); include('functions/slides-meta.php'); // get scripts add_action('wp_enqueue_scripts','my_theme_scripts_function'); function my_theme_scripts_function() { wp_deregister_script('jquery'); wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"), false, '1.4.2'); wp_enqueue_script('jquery'); wp_enqueue_script('sliding effect', get_stylesheet_directory_uri() . '/js/sliding_effect.js'); wp_enqueue_script('superfish', get_stylesheet_directory_uri() . '/js/superfish.js'); wp_enqueue_script('supersubs', get_stylesheet_directory_uri() . '/js/supersubs.js'); if(is_front_page()) : wp_enqueue_script('nivoSlider', get_stylesheet_directory_uri() . '/js/jquery.nivo.slider.pack.js'); endif; } //Add Pagination Support include('functions/pagination.php'); // Limit Post Word Count function new_excerpt_length($length) { return 50; } add_filter('excerpt_length', 'new_excerpt_length'); //Replace Excerpt Link function new_excerpt_more($more) { global $post; return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); //Activate post-image functionality (WP 2.9+) if ( function_exists( 'add_theme_support' ) ) add_theme_support( 'post-thumbnails' ); // featured image sizes if ( function_exists( 'add_image_size' ) ) { add_image_size( 'full-size', 9999, 9999, false ); add_image_size( 'post-image', 150, 150, true ); add_image_size( 'related-posts', 50, 50, true ); add_image_size( 'slider', 960, 360, true ); } // Enable Custom Background add_custom_background(); // register navigation menus register_nav_menus( array( 'main nav'=>__('Main Nav'), ) ); /// add home link to menu function home_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', 'home_page_menu_args' ); // menu fallback function default_menu() { require_once (TEMPLATEPATH . '/includes/default-menu.php'); } add_action( 'init', 'create_post_types' ); function create_post_types() { // Define Post Type For Slider register_post_type( 'slides', array( 'labels' => array( 'name' => _x( 'Slides', 'post type general name' ), // Tip: _x('') is used for localization 'singular_name' => _x( 'Slide', 'post type singular name' ), 'add_new' => _x( 'Add New', 'Slide' ), 'add_new_item' => __( 'Add New Slide' ), 'edit_item' => __( 'Edit Slide' ), 'new_item' => __( 'New Slide' ), 'view_item' => __( 'View Slide' ), 'search_items' => __( 'Search Slides' ), 'not_found' => __( 'No Slides found' ), 'not_found_in_trash' => __( 'No Slides found in Trash' ), 'parent_item_colon' => '' ), 'public' => true, 'exclude_from_search' => true, 'supports' => array('title','thumbnail'), 'menu_icon' => get_stylesheet_directory_uri() . '/images/admin/slides.png', ) ); } //Register Sidebars if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar', 'description' => 'Widgets in this area will be shown in the sidebar.', 'before_widget' => '<div class="sidebar-box clearfix">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name' => 'First Footer Area', 'description' => 'Widgets in this area will be shown in the footer - left side.', 'before_widget' => '<div class="footer-box">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name' => 'Second Footer Area', 'description' => 'Widgets in this area will be shown in the footer - middle left.', 'before_widget' => '<div class="footer-box">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name' => 'Third Footer Area', 'description' => 'Widgets in this area will be shown in the footer - middle right.', 'before_widget' => '<div class="footer-box">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); register_sidebar(array( 'name' => 'Fourth Footer Area', 'description' => 'Widgets in this area will be shown in the footer - right side.', 'before_widget' => '<div class="footer-box">', 'after_widget' => '</div>', 'before_title' => '<h4>', 'after_title' => '</h4>', )); // functions run on activation --> important flush to clear rewrites if ( is_admin() && isset($_GET['activated'] ) && $pagenow == 'themes.php' ) { $wp_rewrite->flush_rules(); } ?>
And this is my code from post-entry.php. I have changed both references in post-entry.php so that ‘excerpt’ now says ‘content’. Is this correct?
<?php while (have_posts()) : the_post(); ?> <div class="post-entry clearfix"> <?php if ( has_post_thumbnail() ) { ?> <div class="post-entry-featured-image"> <a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>" class="opacity"><?php the_post_thumbnail('post-image'); ?></a> </div> <!-- END post-entry-featured-image --> <div class="post-entry-content"> <h2><a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_news_excerpt('500000','','','plain','no'); ?> </div><!-- END post-entry-content --> <?php } else{ ?> <h2><a href="<?php the_permalink(' ') ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php the_news_excerpt('500000','','','plain','no'); ?>. <?php } ?> </div> <!-- END post-entry --> <?php endwhile; ?>
Why am I getting the error message above.
Thanks for any help!
Forum: Fixing WordPress
In reply to: Inserting an image to the homepageThanks esm, but when I change the following code from
`<div class=”post-entry-content”>
<h2><a href=”<?php the_permalink(‘ ‘) ?>” title=”<?php the_title(); ?>”><?php the_title(); ?></a></h2>
<?php the_news_excerpt(‘500000′,”,”,’plain’,’no’); ?>
</div><!– END post-entry-content –>`to
<?php the_news_content(); ?>
I get the following error message
Fatal error: Call to undefined function the_news_content() in /home/bennoh/public_html/wp-content/themes/minimal-xpert/post-entry.php on line 13
Any advice?
Forum: Fixing WordPress
In reply to: Inserting an image to the homepageThanks for the advice esmi… However, I cannot see
<?php the_excerpt();?>
anywhere in the code I have pasted the below. Might it be written in some other way?
<?php // load the theme options $options = get_option( 'mx_theme_settings' ); ?> <?php get_header(' '); ?> <div id="post-content"> <?php if (have_posts()) : ?> <?php get_template_part( 'post' , 'entry') ?> <?php endif; ?> <?php if (function_exists("pagination")) { pagination($additional_loop->max_num_pages); } ?> </div> <!-- END post-content --> <?php get_sidebar(); ?> <div class="clear"></div> <?php get_footer(' '); ?>
Forum: Themes and Templates
In reply to: Images on templatesSorry for my delayed response… I’ve been a little snowed under. I am using the Minimal Xpert Theme.
The four images on the left hand side of the screen are where I would like them to be. You will notice there is a large space between the bottom of my posts and the footer area… This is because I have lots of stuff in my sidebar.
I would like to add an image into that space either above or below the posts and their smaller (correctly positioned) pictures.
Yes, I would like this image to be on the homepage, not the post page.I am a relative beginner with wordpress and modifying templates… I have a tiny amount of experience, but I have normally followed other people’s instructions.
If you could give me any advice I would be extremely grateful.
[duplicate: https://www.ads-software.com/support/topic/inserting-an-image-to-the-homepage?replies=3 – please continue with only one thread – this one here is closed]
Forum: Fixing WordPress
In reply to: Post OrderBrilliant. That is exactly what I was after… Many thanks!
Forum: Fixing WordPress
In reply to: Post OrderThanks for the help duck_boy, unfortunately I do not understand this. I am a total novice and know next to nothing about code. Could you please elaborate in layman’s terms?
Forum: Fixing WordPress
In reply to: Indserting an Imagesorry, https://www.manzatela.com
Forum: Themes and Templates
In reply to: CodingBrilliant, thank you very much! I’m somewhat of a novice if you hadn’t already worked that out!
Forum: Fixing WordPress
In reply to: Post orderMany thanks for your help once again esmi!
Forum: Fixing WordPress
In reply to: Copyright LawsOK great, that’s cleared that up for me. Thanks a lot for the advice!
Forum: Fixing WordPress
In reply to: _excerpt and _contentIt appears as
the_news_excerpt()
in post-entry.php andnew_excerpt_length
andnew_excerpt_more
in functions.phpAre they the same things do you think?
Forum: Fixing WordPress
In reply to: _excerpt and _contentMight it be
// Limit Post Word Count
function new_excerpt_length($length) {
return 50;or
//Replace Excerpt Link function new_excerpt_more($more) {
Forum: Fixing WordPress
In reply to: _excerpt and _contentI cannot find the_news_excerpt() in function.php. And having changed the post-entry.php I am now getting a fatal error
‘Fatal error: Call to undefined function the_news_content() in /home/bennoh/public_html/wp-content/themes/minimal-xpert/post-entry.php on line 13’
on my site