raj080288
Forum Replies Created
-
Forum: Themes and Templates
In reply to: How do i add div tags for specific posts only?thanks!!
Forum: Themes and Templates
In reply to: How do i add div tags for specific posts only?Hi Calvin,
I sorted this now, just had to do another if and end if. Thanks for your help. You’re truly a star!!!
Thank yo very much,I appreciate all your help.
Raj
Forum: Themes and Templates
In reply to: How do i add div tags for specific posts only?Hi Calvin, thanks for your answer it works great. The only problem is I want 2 divs with the same name on the first page and 2 divs with same name on second page. Right now its adding the extra 2 div with the same name to both pages.
Thanks,
Raj
Forum: Themes and Templates
In reply to: Add various class to div elementsthis is solved. @stephencottontail thanks fr all your help.
Forum: Themes and Templates
In reply to: Add various class to div elementsHi, I solved this. I just useda for loop inside the wordpress while loop to get the title of the page and append the “-” plus numbers after it.
<section class = "container" id="<?php echo get_the_title(); ?>"> <article class = "row <?php echo get_the_title(); ?>"> <?php for($i=1; $i<5; $i++){ $x = $i; ?> <div id="<?php echo get_the_title() . "-".$x;?>"> <h3><?php the_content(); ?></h3> </div> <?php } ?> </article> </section>
Forum: Themes and Templates
In reply to: Add various class to div elementsHi,
Thanks for this but the div keeps outputting the same class for all post containers:
The code gives the same id name of contact to all container divs and gives a class name of contact-1, contact-, contact-3 to all of the article div.
We’re nearly there….
Forum: Themes and Templates
In reply to: Add various class to div elementsAny suggestions. Can someone please help,I need to get this done for a client ASAP.I would really appreciate any help given.
Thanks,
Raj
Forum: Themes and Templates
In reply to: Add various class to div elementsright now what the code outputs is:
<div id ="container"> <div class="Home">Home</div> </div>
<div id ="container"> <div class="About">About</div> </div>
<div id ="container"> <div class="Skills">Skills</div> </div>
<div id =”container”>
<div class=”Portfolio”>Portfolio</div>
</div>`<div id =”container”>
<div class=”Contact”>Contact</div>
</div>`as you can see I am limited to only one class name here. For each class name I would like 3-4 class name added.
Forum: Themes and Templates
In reply to: Add various class to div elementsit only gets the class name of ONE class which is the title of the page. I want to add a few more classes section classes so that I can target them for my parallax images. Right now I am limitied to 1 class name per div however, I want more classes to be added.
Forum: Themes and Templates
In reply to: Add various class to div elementsHI,
Thanks for the reply. I have tried that method but it keeps outputting random class names from wordpress. I need each div, ideally inside the container to have its own class names for e.g
<div id ="container"> <div class="class name1 name2 name3>Some content</div> </div>"
<div id ="container"> <div class="class homeParallax homeParralax2 homeParralax3>Some content</div> </div>"
<div id ="container"> <div class="class name1 name2 name3>Some content</div> </div>"
Obviosuly the container tag is looping the posts using the while loop in php. I need to add a div inside the container class where each div within it would have a unique class or id name – see the example above to see what I mean.
I hope this makes sense?