Forum Replies Created
-
AuthorPosts
-
February 9, 2015 at 4:18 pm in reply to: Converting Crystal Child Theme to be Mobile Friendly #140254sookieMember
Thanks for your response.
I have already done that;
/** Add Viewport meta tag for mobile browsers
add_action( ‘genesis_meta’, ‘news_add_viewport_meta_tag’ );
function crystal_add_viewport_meta_tag() {
echo ‘<meta name=”viewport” content=”width=device-width, initial-scale=1.0″/>';
}
*/If you check the style sheet, media queries have already been added.
I am not sure why the website isn't still mobile friendly.
sookieMemberThanks for your help Brad.
I have tried quite a few plugins and so far I haven't found one which gives me dates and dropdown.
The closest I have found is the one that gives me dates but no dropdown.
sookieMemberHi Tony,
Here is what my function.php looks like:
<?php
/**
* Custom amendments for the theme.
*
* @category Foodie
* @subpackage Genesis
* @copyright Copyright (c) 2013, Shay Bocks
* @license GPL-2.0+
* @link http://www.shaybocks.com/foodie/
* @since 1.0.9
*
*/add_action( 'genesis_setup', 'foodie_theme_setup', 15 );
/**
* Theme Setup
*
* This setup function attaches all of the site-wide functions
* to the correct hooks and filters. All the functions themselves
* are defined below this setup function.
*
* @since 1.0.1
*/
function foodie_theme_setup() {//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Foodie Theme', 'foodie' ) );
define( 'CHILD_THEME_VERSION', '1.0.9' );
define( 'CHILD_THEME_URL', 'http://www.shaybocks.com/foodie/' );
define( 'CHILD_THEME_DEVELOPER', __( 'Shay Bocks', 'foodie' ) );//* Add viewport meta tag for mobile browsers.
add_theme_support( 'genesis-responsive-viewport' );//* Add HTML5 markup structure.
add_theme_support( 'html5' );//* Set content width.
$content_width = apply_filters( 'content_width', 610, 610, 980 );//* Add new featured image sizes.
add_image_size( 'horizontal-thumbnail', 680, 453, TRUE );
add_image_size( 'square-thumbnail', 450, 450, TRUE );//* Add support for custom background.
add_theme_support( 'custom-background' );//* Unregister header right sidebar.
unregister_sidebar( 'header-right' );//* Create color style options.
add_theme_support( 'genesis-style-selector', array(
'theme-citrus' => __( 'Citrus', 'foodie' ),
'theme-earthy' => __( 'Earthy', 'foodie' ),
)
);//* Add support for custom header.
add_theme_support( 'genesis-custom-header', array(
'width' => 400,
'height' => 170
)
);//* Add support for 3-column footer widgets.
add_theme_support( 'genesis-footer-widgets', 3 );//* Enqueue child theme styles.
add_action( 'wp_enqueue_scripts', 'foodie_enqueue_syles' );//* Enqueue child theme JavaScript.
add_action( 'wp_enqueue_scripts', 'foodie_enqueue_js' );//* Add child theme body class.
add_filter( 'body_class', 'foodie_add_body_class' );//* Add post navigation.
add_action( 'genesis_after_entry_content', 'genesis_prev_next_post_nav', 5 );//* Modify the WordPress read more link.
add_filter( 'the_content_more_link', 'foodie_read_more_link' );//* Add excerpt read more link.
add_filter( 'excerpt_more', 'get_read_more_link' );
add_filter( 'the_content_more_link', 'get_read_more_link' );//* Modify the speak your mind text.
add_filter( 'genesis_comment_form_args', 'foodie_comment_form_args' );//* Customize the credits.
add_filter( 'genesis_footer_creds_text', 'foodie_footer_creds_text' );//* Load an ad section before .site-inner.
add_action( 'genesis_before', 'foodie_top_ad' );//* Load theme sidebars.
foodie_register_sidebars();//* Disable the editor for the recipe page template.
add_action( 'admin_init', 'foodie_remove_widgeted_editor' );}
/**
* Load Genesis
*
* This is technically not needed.
* However, to make functions.php snippets work, it is necessary.
*/
require_once( get_template_directory() . '/lib/init.php' );/**
* Load all additional stylesheets for the Foodie theme.
*
* @since 1.0.0
*/
function foodie_enqueue_syles() {
wp_enqueue_style( 'foodie-google-fonts', '//fonts.googleapis.com/css?family=Pontano+Sans|Open+Sans:300,400', array(), CHILD_THEME_VERSION );
}/**
* Load all required JavaScript for the Foodie theme.
*
* @since 1.0.1
*/
function foodie_enqueue_js() {
$js_uri = get_stylesheet_directory_uri() . '/lib/js/';
// Add general purpose scripts.
wp_enqueue_script( 'foodie-general', $js_uri . 'general.js', array( 'jquery' ), '1.0.0', true );
}/**
* Add the theme name class to the body element.
*
* @param string $classes
* @return string Modified body classes.
*
* @since 1.0.0
*/
function foodie_add_body_class( $classes ) {
$classes[] = 'foodie';
return $classes;
}/**
* Modify the Genesis read more link.
*
* @param string $more
* @return string Modified read more text.
*
* @since 1.0.0
*/
function foodie_read_more_link() {
return '<p></p>' . __( 'Read More', 'foodie' ) . ' »';
}/**
* Add excerpt read more link.
*
* @param string $more
* @return string Modified read more text.
*
* @since 1.0.0
*/
function get_read_more_link() {
return '... <p></p>' . __( 'Read More', 'foodie' ) . ' »';
}/**
* Modify the speak your mind text.
*
* @since 1.0.0
*/
function foodie_comment_form_args( $args ) {
$args['title_reply'] = __( 'Comments', 'foodie' );
return $args;
}/**
* Customize the footer text
*
* @param string $creds Default credits.
* @return string Modified Shay Bocks credits.
*
* @since 1.0.0
*/
function foodie_footer_creds_text( $creds ) {
return sprintf(
'[footer_copyright before="%s "] · [footer_childtheme_link before=""] %s %s · %s [footer_genesis_link url="http://www.studiopress.com/" before=""] · [footer_wordpress_link before=" %s"]',
__( 'Copyright', 'foodie' ),
__( 'by', 'foodie' ),
CHILD_THEME_DEVELOPER,
__( 'Built on the ', 'foodie' ),
__( 'Powered by ', 'foodie' )
);
}/**
* Load an ad section before .site-inner.
*
* @since 1.0.7
*/
add_action( 'genesis_before', 'foodie_top_ad' );
function foodie_top_ad() {
//* Return early if we have no ad.
if ( ! is_active_sidebar( 'top-ad' ) ) {
return;
}echo '<div class="top-ad">';
dynamic_sidebar( 'top-ad' );
echo '</div>';
}/**
* Register sidebars for Foodie theme.
*
* @since 1.0.0
*/
function foodie_register_sidebars() {
genesis_register_sidebar( array(
'id' => 'top-ad',
'name' => __( 'Top Ad', 'foodie' ),
'description' => __( 'This is the top ad section.', 'foodie' ),
) );
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home Top', 'foodie' ),
'description' => __( 'This is the home top section.', 'foodie' ),
) );
genesis_register_sidebar( array(
'id' => 'home-middle',
'name' => __( 'Home Middle', 'foodie' ),
'description' => __( 'This is the home middle section.', 'foodie' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bottom',
'name' => __( 'Home Bottom', 'foodie' ),
'description' => __( 'This is the home bottom section.', 'foodie' ),
) );
genesis_register_sidebar( array(
'id' => 'recipes-top',
'name' => __( 'Recipes Top', 'foodie' ),
'description' => __( 'This is the recipes top section.', 'foodie' ),
) );
genesis_register_sidebar( array(
'id' => 'recipes-bottom',
'name' => __( 'Recipes Bottom', 'foodie' ),
'description' => __( 'This is the recipes bottom section.', 'foodie' ),
) );
}/**
* Perform a check to see whether or not a widgeted page template is being used.
*
* @since 1.0.0
* @return bool
*/
function foodie_using_widgeted_template( $templates = '' ) {
// Return false if we have post data.
if ( ! isset( $_REQUEST['post'] ) ) {
return false;
}// If no widgeted templates are passed in, check only the default recipes.php.
if ( empty( $templates ) ) {
$templates = array( 'recipes.php' );
}foreach ( $templates as $template ) {
// Return true for all widgeted templates
if ( get_page_template_slug( $_REQUEST['post'] ) === $template ) {
return true;
}
}// Return false for other templates.
return false;
}/**
* Check to make sure a widgeted page template is is selected and then disable
* the default WordPress editor.
*
* @since 1.0.0
*/
function foodie_remove_widgeted_editor() {
// Return early if a widgeted template isn't selected.
if ( ! foodie_using_widgeted_template() ) {
return;
}// Disable the standard WordPress editor.
remove_post_type_support( 'page', 'editor' );//* Add an admin notice for the recipe page template.
add_action( 'admin_notices', 'foodie_widgeted_admin_notice' );
}/**
* Check to make sure a widgeted page template is is selected and then show a
* notice about the editor being disabled.
*
* @since 1.0.0
*/
function foodie_widgeted_admin_notice() {
// Display a notice to users about the widgeted template.
echo '<div class="updated"><p>';
printf (
__( 'The normal editor is disabled because you\'re using a widgeted page template. You need to use widgets to edit this page.', 'foodie' ),
'widgets.php'
);
echo '</p></div>';
}sookieMemberTony, what's your email? I need a bit more help with this. If you have time.
sookieMemberThanks Tony,
I have added the CSS code but the border isn't the same as the: http://pinchofyum.com and the menu is too far from the logo.
sookieMemberHi Tony, I have used this code and works now:
//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );It's just the CSS, am trying to figure out now. I have moved to a demo site now because the other one was on a live website with traffic: http://booking.mozyou.com
Thanks
sookieMemberThanks guys for all your help. Am using the foodie theme and when I replaced the do_nav with the subnav, I got this:
Parse error: syntax error, unexpected 'genesis_header' (T_STRING) in /home3/lulu2929/public_html/booking/wp-content/themes/foodie/functions.php on line 367
Here is a website using the same theme and they have managed to do it: http://www.healthyrecipeecstasy.com
sookieMemberThanks Tony,
I added the code to the functions.php and used this in CSS:
.site-title,
.site-title a {
font-family: 'Open Sans', sans-serif;
font-size: 50px;
font-size: 5rem;
font-weight: 300;
letter-spacing: 4px;
letter-spacing: .4rem;
line-height: 1.625;
text-align: center;
text-transform: uppercase;
}Still no change. I have live traffic coming to the website at the moment.
sookieMemberHi Genwrock, thanks for your help. There is no Header Right with this theme.
sookieMemberThanks again Anitac. How do I get the dates and comments not showing on any of the Recipe, Vegan or inner category views?
sookieMemberThanks for that Anitac, it worked great but how do I get the dates to show on other posts displayed under the featured posts on the homepage?
sookieMemberThank you Swright. That worked like a charm!
sookieMemberI have managed to reduce the white space but the Categories part, has lost it's spacing. This is the code am using:
.sidebar .widget {
border-bottom: 0px solid #ddd;
margin: 0 0 -800px;
padding: 0 0 550px;
}I have adjusted the number quite a bit.
sookieMemberThank you, thank you. You are heaven sent. It was one of the widgets with custom HTML causing problems.
sookieMemberThanks for helping Matt. I can't seem to find the code above in my styles sheet. I have looked for it.
Are you talking about this:
#inner {
margin: 40px auto 0;
overflow: hidden;
width: 960px;
}.balance-landing #inner {
margin: 20px auto 0;
}Here is my footer widget:
/* Footer Widgets
------------------------------------------------------------ */#footer-widgets {
background: url(images/gray-texture.jpg);
clear: both;
margin: 0 0 20px;
padding: 25px 0;
overflow: hidden;
}#footer-widgets .wrap {
font-size: 13px;
overflow: hidden;
margin: 0 auto;
padding: 0;
width: 960px;
}#footer-widgets .widget {
background: none;
border: none;
margin: 0 0 20px;
padding: 0;
text-shadow: #fff 1px 1px;
}#footer-widgets .widget,
#footer-widgets .widget p {
color: #777;
font-family: Verdana, Arial, Tahoma, sans-serif;
font-size: 13px;
}#footer-widgets .widget p {
margin: 0 0 15px;
}#footer-widgets ul {
margin: 0;
}#footer-widgets #wp-calendar thead,
#footer-widgets #wp-calendar td {
background: none;
}.footer-widgets-1 {
float: left;
margin: 0 40px 0 0;
width: 295px;
}.footer-widgets-2 {
float: left;
width: 290px;
}.footer-widgets-3 {
float: right;
width: 295px;
}/* Footer
------------------------------------------------------------ */#footer {
clear: both;
color: #888;
font-family: Arial, Tahoma, sans-serif;
font-size: 13px;
overflow: hidden;
padding: 20px 0;
text-transform: uppercase;
}#footer p {
color: #888;
font-family: Arial, Tahoma, sans-serif;
font-size: 13px;
}#footer .gototop {
display:none;
}#footer .creds {
display:none;
}sookieMemberSorry guys about that. I have now removed the password.
Thanks
sookieMemberThanks for that Emasai.
I tried that but no luck. Here is what the functions theme file look like:
<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );//* Set Localization (do not remove)
load_child_theme_textdomain( 'minimum', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'minimum' ) );//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Minimum Pro Theme', 'minimum' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/minimum/' );
define( 'CHILD_THEME_VERSION', '3.0' );//* Add HTML5 markup structure
add_theme_support( 'html5' );//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );//* Enqueue scripts
add_action( 'wp_enqueue_scripts', 'minimum_enqueue_scripts' );
function minimum_enqueue_scripts() {wp_enqueue_script( 'minimum-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_style( 'minimum-google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400|Roboto+Slab:300,400', array(), CHILD_THEME_VERSION );}
//* Add new image sizes
add_image_size( 'portfolio', 540, 340, TRUE );//* Add support for custom background
add_theme_support( 'custom-background', array( 'wp-head-callback' => '__return_false' ) );//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 320,
'height' => 60,
'header-selector' => '.site-title a',
'header-text' => false
) );//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'nav',
'subnav',
'home-featured',
'site-inner',
'site-tagline',
'footer-widgets',
'footer'
) );//* Add support for 3-column footer widgets
add_theme_support( 'genesis-footer-widgets', 3 );//* Unregister layout settings
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-content-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );//* Unregister secondary sidebar
unregister_sidebar( 'sidebar-alt' );//* Create portfolio custom post type
add_action( 'init', 'minimum_portfolio_post_type' );
function minimum_portfolio_post_type() {register_post_type( 'portfolio',
array(
'labels' => array(
'name' => __( 'Portfolio', 'minimum' ),
'singular_name' => __( 'Portfolio', 'minimum' ),
),
'exclude_from_search' => true,
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => get_stylesheet_directory_uri() . '/images/icons/portfolio.png',
'public' => true,
'rewrite' => array( 'slug' => 'portfolio' ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'genesis-seo' ),
)
);}
//* Remove site description
remove_action( 'genesis_site_description', 'genesis_seo_site_description' );//* Reposition the primary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_after_header', 'genesis_do_nav', 15 );//* Reposition the secondary navigation menu
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
add_action( 'genesis_footer', 'genesis_do_subnav', 7 );//* Reduce the secondary navigation menu to one level depth
add_filter( 'wp_nav_menu_args', 'minimum_secondary_menu_args' );
function minimum_secondary_menu_args( $args ){if( 'secondary' != $args['theme_location'] )
return $args;$args['depth'] = 1;
return $args;}
//* Add the site tagline section to Minimum Pro themes Front Page Only
add_action( 'genesis_after_header', 'minimum_site_tagline' );
function minimum_site_tagline() {
if ( is_front_page() && is_active_sidebar( 'site-tagline-right' ) ) {
printf( '<div %s>', genesis_attr( 'site-tagline' ) );
genesis_structural_wrap( 'site-tagline' );printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
echo '</div>';
printf( '<div %s>', genesis_attr( 'site-tagline-right' ) );
genesis_widget_area( 'site-tagline-right' );
echo '</div>';genesis_structural_wrap( 'site-tagline', 'close' );
echo '</div>';}}
//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'minimum_author_box_gravatar' );
function minimum_author_box_gravatar( $size ) {return 144;
}
//* Modify the size of the Gravatar in the entry comments
add_filter( 'genesis_comment_list_args', 'minimum_comments_gravatar' );
function minimum_comments_gravatar( $args ) {$args['avatar_size'] = 96;
return $args;}
//* Change the number of portfolio items to be displayed (props Bill Erickson)
add_action( 'pre_get_posts', 'minimum_portfolio_items' );
function minimum_portfolio_items( $query ) {if ( $query->is_main_query() && !is_admin() && is_post_type_archive( 'portfolio' ) ) {
$query->set( 'posts_per_page', '6' );
}}
//* Register widget areas
genesis_register_sidebar( array(
'id' => 'site-tagline-right',
'name' => __( 'Site Tagline Right', 'minimum' ),
'description' => __( 'This is the site tagline right section.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-1',
'name' => __( 'Home Featured 1', 'minimum' ),
'description' => __( 'This is the home featured 1 section.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-2',
'name' => __( 'Home Featured 2', 'minimum' ),
'description' => __( 'This is the home featured 2 section.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-3',
'name' => __( 'Home Featured 3', 'minimum' ),
'description' => __( 'This is the home featured 3 section.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-4',
'name' => __( 'Home Featured 4', 'minimum' ),
'description' => __( 'This is the home featured 4 section.', 'minimum' ),
) );
genesis_register_sidebar( array(
'id' => 'home-bkgrd-image',
'name' => __( 'Home Background Image', 'minimum' ),
'description' => __( 'Widgets placed here will appear on top of home background image.', 'minimum' ),
) );//* Add overlay div below home slider
add_action( 'genesis_after_header', 'minimum_home_bkgrd_image_overlay', 9 );function minimum_home_bkgrd_image_overlay() {
if (is_home() || is_front_page()) {
printf( '<div %s>', genesis_attr( 'home-bkgrd-image-overlay-wrapper' ) );
genesis_structural_wrap( 'home-bkgrd-image-overlay' );printf( '<div %s>', genesis_attr( 'home-bkgrd-image-overlay' ) );
genesis_widget_area( 'home-bkgrd-image' );
echo '</div>';genesis_structural_wrap( 'home-bkgrd-image-overlay', 'close' );
echo '</div>';
}
}//* Add support for structural wraps
add_theme_support( 'genesis-structural-wraps', array(
'header',
'site-tagline',
'nav',
'subnav',
'home-featured',
'site-inner',
'footer-widgets',
'footer',
'home-bkgrd-image-overlay'
) );sookieMemberAnyone, please?
-
AuthorPosts