theclarkofben
Forum Replies Created
Viewing 7 replies - 1 through 7 (of 7 total)
-
Forum: Fixing WordPress
In reply to: Genesis: posts not showing on page that uses custom page templateUpdate:
I have found that the following in the template.php file brings posts to the page.<?php /** * @author Ben Clark * @link https://www.clarkben.com */ //* Template Name: People $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts(array('posts_per_page' => 5, 'paged'=>$paged,)); genesis(); ?>
Now I’m trying to work out how this can be customised.
Forum: Fixing WordPress
In reply to: Genesis: posts not showing on page that uses custom page templateI guess I just don’t understand what I need to write in a new page template in order for posts to be called and displayed on the page. I don’t know if it’s the same for Genesis as it is for vanilla WP?
Forum: Fixing WordPress
In reply to: Genesis: posts not showing on page that uses custom page templateHere’s my functions.php:
<?php // This will bring in the Genesis Parent files needed: require_once( TEMPLATEPATH . '/lib/init.php' ); // Setup Child Theme define( 'Child_Theme_Name', __( 'Shell Global', 'shellglobal' ) ); define( 'Child_Theme_Url', 'localhost' ); define( 'Child_Theme_Version', '1.0' ); // Add HTML5 markup structure from parent Genesis framework add_theme_support( 'html5' ); // Add HTML5 responsive recognition from parent Genesis framework add_theme_support( 'genesis-responsive-viewport' ); // Include jQuery script when building pages if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 1); function my_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js", false, null); wp_enqueue_script('jquery'); } // This will bring the CSS across from parent Genesis theme: add_action( 'wp_enqueue_scripts', 'my_child_theme_scripts', 2 ); function my_child_theme_scripts() { wp_enqueue_style( 'parent-theme-css', get_template_directory_uri() . '/style.css' ); wp_enqueue_script( 'global-js', get_stylesheet_directory_uri() . '/global.js'); if (is_page_template( 'login-page.php' )) { wp_enqueue_style( 'custom-login-css', get_stylesheet_directory_uri() . '/custom-login.css'); wp_enqueue_script( 'custom-login-js', get_stylesheet_directory_uri() . '/custom-login.js'); } } // Remove the wp-admin bar at top of browser when logged in for everyone on all pages show_admin_bar(false); // Remove the Genesis site header on all pages remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); // Remove the Genesis site Footer on all pages remove_action('genesis_footer', 'genesis_do_footer'); remove_action('genesis_footer', 'genesis_footer_markup_open', 5); remove_action('genesis_footer', 'genesis_footer_markup_close', 15); /* The below restricts access to the WordPress Admin Area to only users who we want to be there. When logging to wp-login.php this code will check if the user is an administrator and if they are not WordPress will redirect them back to the website home page. */ function restrict_admin() { if ( ! current_user_can( 'manage_options' ) && '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] ) { wp_redirect( site_url() ); } } add_action( 'admin_init', 'restrict_admin', 1 ); ?>
Forum: Fixing WordPress
In reply to: Genesis: posts not showing on page that uses custom page templateHere’s what a page using that template looks like: https://s1.postimg.org/o7sqwwrjz/Screen_Shot_2015_08_28_at_14_40_15.png
Forum: Fixing WordPress
In reply to: Genesis: posts not showing on page that uses custom page templateHere’s the page template:
<?php //* Template Name: People genesis(); ?>
Forum: Plugins
In reply to: [SimpleRestrict] Can Change Default Value In Permission Checkboxes?Mind blown
Forum: Plugins
In reply to: [SimpleRestrict] Can Change Default Value In Permission Checkboxes?If I edit the plugin code would it be a relatively easy edit to do myself? I’m a beginner programmer
Viewing 7 replies - 1 through 7 (of 7 total)