Skip to main content
15 events
when toggle format what by license comment
Jul 15, 2013 at 14:05 comment added kkemple okay i reviewed your site and although i updated the code above and you could copy and past it in to your template, the loop in the template add a class of two-column-post-left to every other article so would need two custom loops, one for regular posts then one for favorites then you would have to combine in an array so you could output them one and one, that is beyond the scope of this site so i wish you the best of luck, but so you know you can copy my code in to your template and it will generate the posts you need, modifying it to work with your current template structure will take work.
Jul 15, 2013 at 14:02 history edited kkemple CC BY-SA 3.0
add context of real code to while loop
Jul 15, 2013 at 13:51 history edited kkemple CC BY-SA 3.0
fixed incorrect if and while statement
Jul 15, 2013 at 4:52 comment added kelly oh nevermind. can't paste it. feel free to look at the page in firebug or whatever. it's internalcompass.us/castle
Jul 15, 2013 at 4:50 comment added kelly the code i have in the child theme index.html is:
Jul 15, 2013 at 4:49 comment added kelly ok, i'll try to paste the code in case that makes any lightbulbs go off for you.. if not, no sweat. i got an error at the line that had endwhile so i took that part out. and now using your code, i've somehow made the favorites posts start showing up at the bottom of the page (yay!), except they look way too wide and a little psycho and aren't in the columns. clearly, i'm an amateur.
Jul 15, 2013 at 3:52 comment added kkemple if i could see the html for the index page it would help but the code snippet i posted goes exactly where you want the html it generates to show up so if you had <div class="favorite-posts"></div> you would put the code in that div. it outputs it exactly where it is in the file.
Jul 15, 2013 at 3:13 comment added kelly just saw the resources you posted. thx a lot. & i will vote.
Jul 15, 2013 at 3:12 comment added kelly thanks. i know this info is putting me on the right track, so i appreciate it. it isn't working so far, and i'm not sure why although i know it's just my own learning curve. i am reading about the loop on codex to see if i can better understand... one thing is that i didn't know where to put the code in the index.html .. i took a guess which was wrong. the two column feature, i specified in the style.css file, so it's still a mystery to me how the site will know to put the loop i'm adding now in the second column rather than the first. but not getting an error message would be a good start:)
Jul 15, 2013 at 2:13 comment added kkemple here are some decent resources to help you further: WP_Query and wptuts, the first is the codex for WP_Query but it shows examples of custom loops, and the second is an excellent resource for wordpress information and tutorials. hope this helps you out. If you liked my answer remember to vote it up! =]
Jul 15, 2013 at 2:09 history edited kkemple CC BY-SA 3.0
added example code for dealing with the post
Jul 15, 2013 at 2:06 comment added kkemple yes it goes where you want the favorite loop and inside of the if statement is where you put the html so it would like something like the edit i will make above, its hard to add code to comments.
Jul 15, 2013 at 2:03 comment added kelly this looks like exactly what i need to do, yes. thank you. i'm still new to this, so: does what you gave me above go in index.html in the child theme? feel free to refer me to another resource, i just haven't ever created a loop.
Jul 15, 2013 at 1:59 review First posts
Jul 15, 2013 at 2:00
Jul 15, 2013 at 1:44 history answered kkemple CC BY-SA 3.0