Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,424 members, 7,819,523 topics. Date: Monday, 06 May 2024 at 05:33 PM

Urgent Help Needed With Wordpress - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Urgent Help Needed With Wordpress (786 Views)

How To Create Hotel Website With Wordpress / Let Me Show You How To Build A Website With Wordpress...fast! / How Create Any Website With Wordpress (wordpress Tutorial App) (2) (3) (4)

(1) (Reply) (Go Down)

Urgent Help Needed With Wordpress by Prime007: 10:39am On Jan 19, 2013
Hi,

I need some help from the "gurus" and "guruesses" (is there such a word?). I have been trying to edit a WordPress theme and got stuck.
I wanted to edit the way the theme looked by having a slideshow at the top of thehomepage and the next posts on the same page displayed in a 2 column form, like a grid.

Now I was reading about the loop and how to use either multiple loops or nested loops to do this, but frankly I got lost. Can anyone please assist with the code to do this?

I know you guys are good, so please help a brother out.
Re: Urgent Help Needed With Wordpress by frisahost(m): 8:17pm On Jan 19, 2013
I can edit the theme to ur teast...08080727598, 08060344587
Re: Urgent Help Needed With Wordpress by Prime007: 9:17pm On Jan 21, 2013
Thanks for the offer. I am looking for help on a specific problem. If you can do it, please post the code here.
Re: Urgent Help Needed With Wordpress by Nobody: 12:12am On Jan 22, 2013
Prime007: Thanks for the offer. I am looking for help on a specific problem. If you can do it, please post the code here.

TheN stay lost because no one will post the codes you want here. Word of advice, finish what you started, there are enough "wordpress bibles" on the internet for you to download.
Re: Urgent Help Needed With Wordpress by PGON(m): 12:30pm On Jan 22, 2013
Don't start what you can't finish...

Hire now...
Get it done
Re: Urgent Help Needed With Wordpress by Prime007: 9:09pm On Jan 22, 2013
This is sad. I always thought this board was a place to come for assistance. The truth is what I want is common. The complete customized website is sold for $20, I am sure none of you would accept such a "paltry" amount for your "skills". I hope that there may still be some kind and helpful people around.
Re: Urgent Help Needed With Wordpress by funkymedina: 10:19pm On Jan 22, 2013
forget the nigerian numskuls ..go to wordpress forum amd ask there. U didnt give any usefull info though, what theme are u using? what is the web address so people can see what ur talking about. This is why they want to form association ..smh!
Re: Urgent Help Needed With Wordpress by soloqy: 10:33pm On Jan 22, 2013
funky medina: forget the nigerian numskuls ..go to wordpress forum amd ask there. U didnt give any usefull info though, what theme are u using? what is the web address so people can see what ur talking about. This is why they want to form association ..smh!

First of all, he didnt post enough info to get useful help from interested parties or people who use WordPress.
Secondly, getting free help for his website is not his right. People can choose to offer free help or not.

@OP, you need to post enough info on your issue or post a link to get people who are interested in WordPress to chip in.

I dont use WordPress anyways.
Re: Urgent Help Needed With Wordpress by funkymedina: 11:51pm On Jan 22, 2013
soloqy:

First of all, he didnt post enough info to get useful help from interested parties or people who use WordPress.
Secondly, getting free help for his website is not his right. People can choose to offer free help or not.

@OP, you need to post enough info on your issue or post a link to get people who are interested in WordPress to chip in.

I dont use WordPress anyways.
you have just repeated what I said ! People want to charge him money instead of help him ..that is what is pissing me off. So I asked him to post more info and told him what info to post to get started in helping
Re: Urgent Help Needed With Wordpress by Prime007: 4:22am On Jan 23, 2013
Thank you all for your replies. The facts are:

1. I don't have a blog yet.

2. Whatever WordPress theme I choose, to achieve what I want requires me to amend the loop sequence in the index.php file.

3. To have WprdPress display posts as a 2 column grid is petty straight forward. This requires only the addition of 4 lines to the Wordpress loop code.
for example : <?php if ($col == 1) echo "<div class="row">"; ?>

4. The problem really is how to have the script display a single post from a specified category, before starting the grid. This works irrespective of theme (the loop is in the same place in every theme)

This is how the WordPress website itself explains it:

"Leaving all formatting and CSS issues aside, let us assume we want to have two lists of posts. One which would list the most recent posts (the standard 10 posts most recently added), and another which would contain only one post from the category ‘featured’. Posts in the ‘featured’ category should be shown first, followed by the second listing of posts (the standard). The catch is that no post should appear in both categories.

Step 1. Get only one post from the ‘featured’ category.
<?php $my_query = new WP_Query('category_name=featured&posts_per_page=1');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<!-- Do stuff... -->
<?php endwhile; ?>

In English the above code would read:
Set $my_query equal to the result of querying all posts where the category is named featured and by the way, get me one post only. Also, set the variable $do_not_duplicate equal to the ID number of the single post returned. Recall that the Do stuff line represents all the formatting options associated for the post retrieved.
Note that we will need the value of $do_not_duplicate in the next step to ensure that the same post doesn't appear in both lists.

Step 2. The second loop, get the X latest posts (except one).
The following code gets X recent posts (as defined in WordPress preferences) save the one already displayed from the first loop and displays them according to Do stuff.
<?php if (have_posts()) : while (have_posts()) : the_post();
if( $post->ID == $do_not_duplicate ) continue;?>
<!-- Do stuff... -->
<?php endwhile; endif; ?>

In English the above code would read:
Get all posts, where a post equals $do_not_duplicate then just do nothing (continue), otherwise display all the other the posts according to Do stuff. Also, update the cache so the tagging and keyword plugins play nice. Recall, $do_not_duplicate variable contains the ID of the post already displayed.

The End Result
Here is what the final piece of code looks like without any formatting:
<?php $my_query = new WP_Query('category_name=featured&posts_per_page=1');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;?>
<!-- Do stuff... -->
<?php endwhile; ?>
<!-- Do other stuff... -->
<?php if (have_posts()) : while (have_posts()) : the_post();
if( $post->ID == $do_not_duplicate ) continue; ?>
<!-- Do stuff... -->
<?php endwhile; endif; ?>

The end result would be a page with two lists. The first list contains only one post -- the most recent post from the 'feature' category. The second list will contain X recent posts (as defined in WordPress preferences) except the post that is already shown in the first list. So, once the feature post is replaced with a new one, the previous feature will show up in standard post list section below (depending on how many posts you choose to display and on the post frequency). This technique (or similar) has been used by many in conjunction with knowledge of the Template Hierarchy to create a different look for home.php and index.php. See associated resources at the bottom of this page."


What I wanted was someone who could simplify this, especially the "do stuff" part , which is where the post formatting is inserted.
Re: Urgent Help Needed With Wordpress by Nobody: 5:28am On Jan 23, 2013
funky medina: forget the nigerian numskuls ..go to wordpress forum amd ask there. U didnt give any usefull info though, what theme are u using? what is the web address so people can see what ur talking about. This is why they want to form association ..smh!

You have forgetten that you are a nigerian, which makes you a numskull. Why should even take to your advice.

Take your time ooo

(1) (Reply)

Help On Web Hosting / Will Syskay Come Back? / Please I Need Your Reviews On Www.warehouse.com.ng

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 33
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.