M1chel
Forum Replies Created
-
Forum: Themes and Templates
In reply to: applying javascript effect to a menu. how?uhm..
well, first of all thanks RGlover.
unfortunately as I never used javascript I didn’t fully understood and I can’t get it working yet.
could you explain a bit more?for instance this is the code from the website I mentioned above using this script
<script type="text/javascript" charset="utf-8"> //<![CDATA[ $(document).ready(function() { function addMega(){ $(this).addClass("hovering"); } function removeMega(){ $(this).removeClass("hovering"); } var megaConfig = { interval: 0, sensitivity: 4, over: addMega, timeout: 500, out: removeMega }; $("li.mega").hoverIntent(megaConfig) }); //]]> </script>
could it be useful as reference to explain me exactly what I have to write? ??
I know, I seem a little slow, but let’s say I am and that you have to explain this to me ??thank you, I guess it’s simple but it’s all new to me.
Forum: Themes and Templates
In reply to: styling tagsah so you’re sure that’s the class for tags?
I don’t know what could be overwriting it coz I’m using my custom css and tags have no style applied at all.. apart for the standard link properties. at list so it seems from cssviewer and firebug. I looked even if they inherited some properties from something else but there’s just normal stuff.I’ld love to give you a link to my site to let you look into it but unfortunately I’m still building the whole thing and I’m working from my local wamp.
thank you for the effort
Forum: Themes and Templates
In reply to: styling tagsnope, unfortunately..
Forum: Themes and Templates
In reply to: styling tagseh no ??
I have to style the link. this way the tags links are still over ruled by their closest markup element, the<a
so my last option would be to style the general<a
attribute in my css but that would obviously affect all the others.so there’s no place that state how the tag will be outputted and that I can modify?
Thanks anyway Esmi, I appriciate.
Forum: Themes and Templates
In reply to: styling tagsForum: Themes and Templates
In reply to: is this possible with just CSS or do I need a plug-inI guess you’ld like to feature that on you home page right?
I’m doing something similar and my solution is to use a script that shows the latest post of a given category. with another piece of php I also add the first image of that post and below adding title and excerpt is very simple.<?php query_posts ('cat=5&showposts=1'); ?> //here you can change the category ID or the namber of posts to show <?php while (have_posts()) : the_post(); ?> <a class="title" href="<?php the_permalink() ?>" rel""> <div class="picture"> <img class="c" src="<?php getImage('1'); ?>//this is the part that grabs the first picture of your post </a> </div><!--picture--> <div class="first_article"> <a class="title_main" href="<?php the_permalink() ?>"><h3><?php the_title(); ?></h3></a> <p class="text"><?php the_excerpt() ?> </p> <ul class="mini_post"> <li class="rm"><a class="read_more" href="<?php the_permalink() ?>"><span>Read more</span></a><li> <li class="cm"><a class="comments" href="<?php the_permalink() ?>"><span>Comments <?php comments_number('0', '1', '%'); ?></span></a><li> </ul> <?php endwhile;?>
ok, you don’t have to use this html structure, I just grabbed my own code and for some reasons I build it like that.
so, at the beginning I’m retrieving 1 post from a given category but you could also retrieve a particular post with this code:<?php // retrieve one post with an ID of 5 query_posts('p=5'); ?>
then I have a div for the picture and here you can only see the tag I used to retrieve the image but there’s also a code to put in the function.php
you can find the instructions here: https://bavotasan.com/tutorials/retrieve-the-first-image-from-a-wordpress-post/then were I wanted the text I used the
<? php the_excerpt () ?>
and it shows the excerpt you wrote on your admin panel when you wrote the article. if instead you used the tag<!--more-->
inside the article then you have to use<? php the_content () ?>
fianlly where you see the unordered list I also added a “read more” link and a “comment” link which also shows the current number of comments for that post.
All this stuff is in a template I created for the home page so this is all stuff you need to put in a template. even the index or the single page, is up to you.
However it’s the first time that I deal with wordpress so I can’t be of much help but look at this link to find more tips. they really helped me:
https://www.noupe.com/wordpress/mastering-your-wordpress-theme-hacks-and-techniques.htmlhttps://www.smashingmagazine.com/2009/01/07/10-killer-wordpress-hacks/
https://www.smashingmagazine.com/2009/04/15/10-exceptional-wordpress-hacks/
I hope I helped!
Have fun ??Michel
Forum: Themes and Templates
In reply to: random php templateok, thanks, I find a solution this way:
<?php
$numero = rand(1,3);
include( TEMPLATEPATH . ‘/cat-4-feat-‘ . $numero . ‘.php’);
?>??