ilmattiapascal
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Modify the single.php default layoutwow! i figured out something. i changed the get_bigimage, with the more classic <?php the_post_thumbnail(); ?>.
Now something is working and i need your help to let it work definetly.
i have my new and lovely div between the nav bar and the rest of the layout. I m free to change the size and he seems to work like a charm.
The only problem is to bound the featured image to this box. the feat image appears, but she isn’t relative to the new division..
Forum: Fixing WordPress
In reply to: Modify the single.php default layouti m looking for guides, maybe what i ask is not the real solution of the problem, but at least a strong help about what i should “study” to achieve this. If i ve to make it by myself, i ask you to help me to wasting less time searching for a guide or a manual. (so don’t be too generic please)
my reference site is always that one, look at the bigimage between the header and the rest: https://www.garancedore.fr/2013/04/16/mes-halteres/
until now i made that, and obviously it doesn’t work:
<div id="bigimage"> <div id="bigwideimage"> <?php get_bigimage(); ?> </div> </div> <div id="primary" class="site-content"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php get_template_part( 'content', get_post_format() ); ?> <?php if ( function_exists('related_posts') ) { related_posts (); } ?>
in single.php. then i tried to call the div id in style.css like that:
/* articles */ #bigimage { display: block; margin: 0; padding: 10px; } #bigwideimage { width: 500px; height: 200px; margin: 0; }
obviously now the post page doesn’t work because wp told me to define the function get_bigimage….and i really don’t know how to make it in the function.php ??
`Forum: Fixing WordPress
In reply to: Put the featured image outside the contentok alchymyth, thank you again. you know, i feel like i made a long trip to find that what i had in mind was totally wrong.
what i tried until now, thanks also to your help, was to get the image outside the content to resize it full size as a big main image of the post. But i realized that i got terribly wrong because anyway the featured image is linked to the content division, so if i resize the image, i will have problems with the rest of the content.
Infact, i understood that what i need is to change the theme layout adding a new div class in content.php called, for example, “bigimage”. (am i right?) Place this div above the main content div, and also above the sidebars (with approximately the same conditional rules said before).
the problem is that i don’t know how to create a div class of an object that it doesn’t exists yet..i suppose i ve to make :
<?php if (is_single() ) : ?> <div class="bigimage"> <?php the_post_thumbnail(full); ?> </div> <?php endif; ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> <div class="featured-post"> <?php _e( 'Featured post', 'twentytwelve' ); ?> </div> <?php endif; ?> <header class="entry-header">
how i define Bigimage?…then i will have to make a voice in the style.css to control margins, paddings and other stuff..
Forum: Fixing WordPress
In reply to: Put the featured image outside the contentthanks as always. this solved my problem.
i don’t want to open a new topic, so i try to ask you two more questions if it doesn’t bother you:
1) how can i change the size of the featured image only for the single page? which sentence i ve to add in the conditional that you gave me?
2) i know the if i put something into the brackets of is_single() the action will be reffered to a specific thing (single one, or even an array of elements). I would like to say, apply this only for the last post. what i ve to put?
thank you really as always for your patience.
Forum: Fixing WordPress
In reply to: Put the featured image outside the contentok, so i put
<?php if (is_single() ) : ?> <?php the_post_thumbnail(); ?> <?php endif; ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> <div class="featured-post"> <?php _e( 'Featured post', 'twentytwelve' ); ?> </div> <?php endif; ?>
and it works for the post page. but now my homepage has not the image. If i put the image in the content, then i ll have the same image twice, one upstairs where i want, and the other inside the content (and that’s weird)…someone can help me?
Forum: Fixing WordPress
In reply to: Put the featured image outside the contenti m trying to put the conditionals, but i don’t really understand how i put the sentence after the conditional (which i already knew it was is_single() ) i m in the content.php and i ve to say : if is_single put the featured image before entry content, else put it on the normal way..:(
Forum: Fixing WordPress
In reply to: Put the featured image outside the contentthank you , i read it and i m sure i ll get out of it..i asked here only because it’s been a week that i m trying to solve problems by myself and today i was a little tired ??
can i ask you something more specific ? what i have to put in between the brackets if i want the propriety to be active for each last post published ?
Forum: Plugins
In reply to: [Easing Slider] Slider not appearing at Headerhi sunny, how you solved the issue?
Forum: Themes and Templates
In reply to: [Twenty Twelve] excerpt blog index and category index?thank you, this could be the real solution for people who wants excerpts on the index page on twentytwelve ??
Forum: Fixing WordPress
In reply to: Display Category title on postsoh, well……
i made an experiment, i displayed the style as a block et voilà…the text got aligned exactly in the center.
cool ?? i hope i didn’t destroyed something else btw. ??
Forum: Fixing WordPress
In reply to: Display Category title on poststhank you, really thank you. it’s great because thanks to your advices i’m improving my little CSS knowledge.
now i m able to do nearly what i wanted to. I can’t understand why the text align is different from the others options. Now i can change nearly everything of the style, except the text allignement.
but i’t ok, thank you mister! ??
Forum: Fixing WordPress
In reply to: Display Category title on poststhis is a piece of my child content.php with your span code inserted.
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?> <div class="featured-post"> <?php _e( 'Featured post', 'twentytwelve' ); ?> </div> <?php endif; ?> <span class="category-title"> <?php foreach( get_the_category() as $category ) { $category_name = $category->cat_name; } echo ' <a href="' . get_category_link( $category->term_id ) . '">' . $category_name . '</a> ' . $post->title; ?> </span> <header class="entry-header"> <?php the_post_thumbnail(); ?> <?php if ( is_single() ) : ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php else : ?> <h1 class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_title(); ?></a> </h1> <?php endif; // is_single() ?> </header><!-- .entry-header -->
Forum: Fixing WordPress
In reply to: Display Category title on poststhank you again for your patience,
i tried to paste your code but nothing happens. I replaced what i did before with your code, than i went to style.css and tried to add the class to be able to customize it. I tried to make that:
.entry-header .category-title a { text-decoration: none; padding-left: 0px; left: 0px; font-size: 34px; font-family: Anton; }
but it hasn’t worked.
what i would like to achieve is a sort of
.entry-header .entry-title a { text-decoration: none; padding-left: 0px; left: 0px; font-size: 34px; font-family: Anton;
but for the category strip.
until now i was able thank to your advice to put the linkable category name on the top of the post but i need to change the font and the alignement. If i inspect with chrome the category name, i always get the
<a>
generical proprieties which affect the whole content:a { outline: none; color: #333333; font-family: "PT Sans Caption Web Regular"; font-size: 15px; text-align: center; text-decoration: none; margin-left: 0px; }
i would like a isolated class to customize.
if i wasn’t able to explain this clearly, what i want to achieve is the category style on the top of the post title in this website:
https://www.garancedore.fr/hope i m not too complicated, thank you again.
Forum: Fixing WordPress
In reply to: Display Category title on postsi m obsvering that it’s a little more complicated than simply add something to style.css
guess i ve to create a class in the content.php and then call that class in the style.css but i m not pretty sure on how to make this in a correct way..
Forum: Fixing WordPress
In reply to: Display Category title on postsalchymyth, just, thank you. you solved my problem. ??
i only have one more question about it; once i put this category link on the post, i would like to stylize it a little bit (change font, and first of all, center the text, padding, margin), how can i add it in the style.css ?
i guess i ve to put something like .entry-header.xxxxx (where xxxx is something about an entry category) and then customize the string as i made for titles, comments etc etc…what i ve to put exactly? and what if i would like to change the category text with an icon?
thank you again.