Forum Replies Created
-
AuthorPosts
-
February 7, 2014 at 5:23 pm in reply to: How do I automatically link featured image to the post? #89243
ludvig
MemberMy WP and plugins are all up-to-date.
I believe the images are in the body of the posts. When I put up the images for posts i usually UPLOAD IT VIA WORDPRESS, not via FTP. Then I am given options in WordPress about the size.
I then have 3 size options:((CORRECTIONI now have zero options to choose from inside of the WordPress image uploader. But I will fix this tomorrow))
The options I had were small, medium, and full-size.
I can then select which image from the post to use as featured image.
Does that answer your question?
February 7, 2014 at 4:48 pm in reply to: How do I automatically link featured image to the post? #89229ludvig
MemberI'm on it. That's incredibly weird.
Do you see images above the header btw?
And do you know how to fix the original problem in the thread? About linking featured images to the post?
I REALLY appreciate you telling me. This could've (maybe still can) gone very bad for me. Thank you Anitac!
February 7, 2014 at 4:25 pm in reply to: How do I automatically link featured image to the post? #89223ludvig
MemberCan you still log into the site?
I have tried from my own computer and my phone (after having logged out) and it doesn't seem like it's possible anymore.
February 7, 2014 at 4:16 pm in reply to: How do I automatically link featured image to the post? #89220ludvig
MemberThank you.
This happened just now.
I've no idea what's going on. But I'd really appreciate any help I could get.
ludvig
MemberHere's the PHP code inside my Genesis "page_landing" document looks like. (But as far as I can remember I have not touched it):
<?php
/**
* This file adds the Landing template to the Streamline Child Theme.
*
* @author StudioPress
* @package Generate
* @subpackage Customizations
*//*
Template Name: Landing
*/// Add custom body class to the head
add_filter( 'body_class', 'streamline_add_body_class' );
function streamline_add_body_class( $classes ) {
$classes[] = 'streamline-landing';
return $classes;
}// Remove header, navigation, breadcrumbs, footer widgets, footer
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
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_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_after_header', 'genesis_do_subnav', 15 );
remove_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs');
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );genesis();
ludvig
MemberHere's an image of how it looked when the the home (and other pages) [[BUT NOT THE LANDING PAGE!] crashed.
ludvig
MemberI did the following:
I tried doing everything you suggested above, but there was no difference.
It did however crash my site, and despite refreshing, I don't know what it was that caused the site to crash. I believe it was when I removed the "non-genesis code".
Then I restored everything back to how it was, but the page was still looking weird. This was probably because of WC3Cache or other plugins. So I deactived them all. Then it was all restored to normal.
--- So I gained nothing, except having to fix and readjust plugins.
...........
I still have no idea what is causing this displacement of the landing page.Any kind of tips would be appreciated.
ludvig
MemberHey Brad,
Thanks for taking the time to help.
However, after taking a look at the link you sent and my PHP, I still don't understand where the problem is.
By looking at the link you sent I figured the problem was this one:
Error Line 189, Column 5: end tag for "li" omitted, but OMITTAG NO was specified
</div></div><div id="inner"><div class="wrap"> <div id="content-sidebar-wr…
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
But I couldn't find it in my PHP document on line 189.
However, am using Dreamweaver and I saw that there were 3 read RED signs words when using the code "<?php" in the document. Could this be what's causing the problem?
Here's my PHP code:
<?php
/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Streamline Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/streamline' );/** Add Viewport meta tag for mobile browsers */
add_action( 'genesis_meta', 'streamline_add_viewport_meta_tag' );
function streamline_add_viewport_meta_tag() {
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array( 'streamline-blue' => 'Blue', 'streamline-green' => 'Green' ) );/** Add support for structural wraps */
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );/** Add new image sizes */
add_image_size( 'home-featured', 255, 80, TRUE );
add_image_size( 'post-image', 642, 250, TRUE );
add_image_size( 'thumbnail', 150, 150, TRUE );
add_image_size( 'small', 50, 50, TRUE );
add_image_size( 'Slideshow', 520, 280, TRUE );
add_image_size( 'Small Thumbnail', 70, 70, TRUE );/** 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' );/** Add support for custom background */
add_custom_background();/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 200 ) );/** Add newsletter section after header */
add_action( 'genesis_before_content_sidebar_wrap', 'streamline_newsletter' );
function streamline_newsletter() {
if ( ! is_home() )
return;genesis_widget_area( 'newsletter', array(
'before' => '<div class="newsletter widget-area">',
) );
}/** Reposition the breadcrumbs */
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' );/** Customize breadcrumbs display */
add_filter( 'genesis_breadcrumb_args', 'streamline_breadcrumb_args' );
function streamline_breadcrumb_args( $args ) {
$args['home'] = 'Home';
$args['sep'] = ' ';
$args['list_sep'] = ', '; // Genesis 1.5 and later
$args['prefix'] = '<div class="breadcrumb"><div class="inner">';
$args['suffix'] = '</div></div>';
$args['labels']['prefix'] = '<span class="home"></span>';
return $args;
}/** Relocate the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_author_posts_link] [post_date] [post_comments] [post_edit]';
return $post_info;
}}/** Add markup around post class */
add_action( 'genesis_before_post', 'streamline_post_markup' );
function streamline_post_markup() { ?>
<div class="post-wrap">
<?php
}add_action( 'genesis_after_post', 'streamline_post_markup_close' );
function streamline_post_markup_close() { ?>
</div>
<?php
}/** Modify the size of the Gravatar in the author box */
add_filter( 'genesis_author_box_gravatar_size', 'streamline_author_box_gravatar_size' );
function streamline_author_box_gravatar_size($size) {
return '80';
}/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
return $post_meta;
}}/** Add the after post section */
add_action( 'genesis_after_post_content', 'streamline_after_post' );
function streamline_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-post', array(
'before' => '<div class="after-post widget-area">',
) );
}/** Add the before comments section */
add_action( 'genesis_after_post_content', 'nabm_add_extra_widget' );
function nabm_add_extra_widget() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'before-comments', array(
'before' => '<div class="before-comments widget-area">',
) );
}/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );/** Register widget areas */
genesis_register_sidebar( array('id' => 'newsletter',
'name' => __( 'Newsletter', 'streamline' ),
'description' => __( 'This is the newsletter section below the navigation.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-1',
'name' => __( 'Home Featured #1', 'streamline' ),
'description' => __( 'This is the featured #1 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-2',
'name' => __( 'Home Featured #2', 'streamline' ),
'description' => __( 'This is the featured #2 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-3',
'name' => __( 'Home Featured #3', 'streamline' ),
'description' => __( 'This is the featured #3 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'After Post', 'streamline' ),
'description' => __( 'This is the after post section.', 'streamline' ),
) );genesis_register_sidebar( array(
'id' => 'before-comments',
'name' => __( 'Before Comments', 'streamline' ),
'description' => __( 'This is the second after post section.', 'streamline' ),
) );/** Moving Your Primary Navigation before Header **/
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );/** Read More changed to Continue Reading... **/
add_filter( 'excerpt_more', 'child_read_more_link' );
add_filter( 'get_the_content_more_link', 'child_read_more_link' );
add_filter( 'the_content_more_link', 'child_read_more_link' );
function child_read_more_link() {
return 'Continue Reading...';}
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );function sws_social_icons($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] )
return $menu;
ob_start();
dynamic_sidebar('Social Menu');
$social = ob_get_clean();
return $menu . $social;
}if ( function_exists( 'add_theme_support' ) )
add_theme_support( 'post-thumbnails' );
/** MANUAL EXCEPRTS FOR RSS FEED... **/
function excerpt_read_more_link($output) {
global $post;
return $output . 'ID) . '"> Read More...';
}ludvig
Memberdone
ludvig
MemberIn the meantime I fixed the new jetpack popular post plugin to look quite nicely. Heh.
ludvig
MemberI'm not getting any emails...
Are you sending to [email protected] ?
I check my gmail as well, but no mail there either.
ludvig
MemberHere's what it looks like now, just like yours:
/** Add the before comments section */
add_action( 'genesis_after_post_content', 'nabm_add_extra_widget' );
function nabm_add_extra_widget() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'before_comments', array(
'before' => '<div id="before-comments">',
) );
}Still no difference...
Is there another way of creating this widget area?
I am totally lost on why this doesn't work as it seems to be the exact same as my other widget area that is working.
ludvig
MemberI changed it (correctly this time?), and here's what it looks like now in the php (+ what's above and working):
/** Add the after post section */
add_action( 'genesis_after_post_content', 'streamline_after_post' );
function streamline_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-post', array(
'before' => '<div class="after-post widget-area">',
) );
}/** Add the before comments section */
add_action( 'genesis_before_comments', 'nabm_add_extra_widget' );
function nabm_add_extra_widget() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'before_comments', array(
'before' => '<div id="before-comments">',
) );
}ludvig
MemberIt didn't make any difference.
This is what you meant for me to put into the PHP right?
/** Add the before comments section */
add_action( ‘genesis_before_comments’, ‘nabm_add_extra_widget’ );
function nabm_add_extra_widget() {
if ( is_singular( ‘post’ ) )
genesis_widget_area( 'before_comments', array(
'before' => '<div id="genesis_after_post_content">',
) );
}ludvig
MemberNothing changed.
I can still see the widget area from the widget menu and put items into it, but it doesn't display anything.
Hmm...
I wonder why it differs. To me it looks pretty much the same as my other after post area that is working.
ludvig
MemberAlright, there we go, now the widget area is visible and "insertable".
But it still doesn't do anything when I put in the widgets into the widget area.
Any idea why?Do I need to use genesis sidebars or something?
Thanks for helping me so far Andrea!
ludvig
MemberOk.
Btw I changed it again to:
/** Add the before comments section */
add_action( 'genesis_before_comments', 'nabm_add_newsletter_box' );
function nabm_add_before_comments() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'before_comments', array(
'before' => '<div id="comments">',
'after' => '</"after-post widget-area">'
) );
}HERE IS MY ENTIRE PHP
<?php
/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Streamline Theme' );
define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/streamline' );/** Add Viewport meta tag for mobile browsers */
add_action( 'genesis_meta', 'streamline_add_viewport_meta_tag' );
function streamline_add_viewport_meta_tag() {
echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}/** Create additional color style options */
add_theme_support( 'genesis-style-selector', array( 'streamline-blue' => 'Blue', 'streamline-green' => 'Green' ) );/** Add support for structural wraps */
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );/** Add new image sizes */
add_image_size( 'home-featured', 255, 80, TRUE );
add_image_size( 'post-image', 642, 250, TRUE );
add_image_size( 'thumbnail', 150, 150, TRUE );
add_image_size( 'small', 50, 50, TRUE );
add_image_size( 'Slideshow', 520, 280, TRUE );
add_image_size( 'Small Thumbnail', 70, 70, TRUE );/** 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' );/** Add support for custom background */
add_custom_background();/** Add support for custom header */
add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 200 ) );/** Add newsletter section after header */
add_action( 'genesis_before_content_sidebar_wrap', 'streamline_newsletter' );
function streamline_newsletter() {
if ( ! is_home() )
return;genesis_widget_area( 'newsletter', array(
'before' => '<div class="newsletter widget-area">',
) );
}/** Reposition the breadcrumbs */
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' );/** Customize breadcrumbs display */
add_filter( 'genesis_breadcrumb_args', 'streamline_breadcrumb_args' );
function streamline_breadcrumb_args( $args ) {
$args['home'] = 'Home';
$args['sep'] = ' ';
$args['list_sep'] = ', '; // Genesis 1.5 and later
$args['prefix'] = '<div class="breadcrumb"><div class="inner">';
$args['suffix'] = '</div></div>';
$args['labels']['prefix'] = '<span class="home"></span>';
return $args;
}/** Relocate the post info function */
remove_action( 'genesis_before_post_content', 'genesis_post_info' );
add_action( 'genesis_before_post', 'genesis_post_info' );/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_author_posts_link] [post_date] [post_comments] [post_edit]';
return $post_info;
}}/** Add markup around post class */
add_action( 'genesis_before_post', 'streamline_post_markup' );
function streamline_post_markup() { ?>
<div class="post-wrap">
<?php
}add_action( 'genesis_after_post', 'streamline_post_markup_close' );
function streamline_post_markup_close() { ?>
</div>
<?php
}/** Modify the size of the Gravatar in the author box */
add_filter( 'genesis_author_box_gravatar_size', 'streamline_author_box_gravatar_size' );
function streamline_author_box_gravatar_size($size) {
return '80';
}/** Customize the post meta function */
add_filter( 'genesis_post_meta', 'post_meta_filter' );
function post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
return $post_meta;
}}/** Add the after post section */
add_action( 'genesis_after_post_content', 'streamline_after_post' );
function streamline_after_post() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'after-post', array(
'before' => '<div class="after-post widget-area">',
) );
}/** Add the before comments section */
add_action( 'genesis_before_comments', 'nabm_add_newsletter_box' );
function nabm_add_before_comments() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'before_comments', array(
'before' => '<div id="comments">',
'after' => '</"after-post widget-area">'
) );
}/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );/** Register widget areas */
genesis_register_sidebar( array('id' => 'newsletter',
'name' => __( 'Newsletter', 'streamline' ),
'description' => __( 'This is the newsletter section below the navigation.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-1',
'name' => __( 'Home Featured #1', 'streamline' ),
'description' => __( 'This is the featured #1 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-2',
'name' => __( 'Home Featured #2', 'streamline' ),
'description' => __( 'This is the featured #2 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'home-featured-3',
'name' => __( 'Home Featured #3', 'streamline' ),
'description' => __( 'This is the featured #3 column on the homepage.', 'streamline' ),
) );
genesis_register_sidebar( array(
'id' => 'after-post',
'name' => __( 'After Post', 'streamline' ),
'description' => __( 'This is the after post section.', 'streamline' ),
) );/** Load Lora and Oswald Google fonts
add_action( 'wp_enqueue_scripts', 'custom_load_google_fonts' );
function custom_load_google_fonts() {
wp_enqueue_style( 'google-font', 'http://fonts.googleapis.com/css?family=Lora);', array(), PARENT_THEME_VERSION );
}/** Moving Your Primary Navigation before Header **/
remove_action( 'genesis_after_header', 'genesis_do_nav' );
add_action( 'genesis_before_header', 'genesis_do_nav' );/** Read More changed to Continue Reading... **/
add_filter( 'excerpt_more', 'child_read_more_link' );
add_filter( 'get_the_content_more_link', 'child_read_more_link' );
add_filter( 'the_content_more_link', 'child_read_more_link' );
function child_read_more_link() {
return 'Continue Reading...';}
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );function sws_social_icons($menu, $args) {
$args = (array)$args;
if ( 'primary' !== $args['theme_location'] )
return $menu;
ob_start();
dynamic_sidebar('Social Menu');
$social = ob_get_clean();
return $menu . $social;
}if ( function_exists( ‘add_theme_support’ ) )
add_theme_support( ‘post-thumbnails’ );
/** MANUAL EXCEPRTS FOR RSS FEED... **/
function excerpt_read_more_link($output) {
global $post;
return $output . 'ID) . '"> Read More...';
}ludvig
MemberHere's what I put into my PHP:
/** Add the before comments section */
add_action( 'genesis_before_comments', 'nabm_add_newsletter_box' );
function nabm_add_before_comments() {
if ( is_singular( 'post' ) )
genesis_widget_area( 'newsletter', array(
'before' => '<div id="newsletter">',
'after' => '</div>'
) );
}But nothing happened when i refreshed my widgets area.
What is it i am doing wrong or missing?
ludvig
MemberYes I think so too.
Will you please help me do it?
(It looks horrible to add another widget to the current after post area, so I definitely do not want that)
The header/nav is working somewhat how I want it to, I'm too scared to mess more with it for now.
Thanks for the help on that one 🙂
December 11, 2013 at 11:23 am in reply to: jetpack popular posts displaying pages all of a sudden – why!? #78346ludvig
MemberI see. I guess I'll try my luck with that one instead for now.
-
AuthorPosts