2258 posts Digital Artist
  • Front Page Master
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
+15 more
crozer
says

Eyo,
I am finishing my first WP theme, and I have a doubt that I consider easy to fix (I have tried, and I feel as if I am so close to fixing/getting it, but it just doesn’t happen).

Anyway, the thing is, I’d like to add a sidebar ‘widget’ (not sure if it’s entirely a widget, because I think a few PHP lines should to the trick) that displays the blog’s about-page (and ideally only that that has been written before the

<!-- more -->
tag).

Thank you very much in advance.
I hope a widget isn’t necessary, as I really would like to avoid one for the moment.

Chris

308 posts
  • Affiliate Level 1
  • Author Level 7
  • Beta Tester
  • Collector Level 2
+5 more
brainbuzzmedia
says

It would be a lot easier to just make a widget area and put a text widget in with the “About Us” info.

2258 posts Digital Artist
  • Front Page Master
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
+15 more
crozer
says
It would be a lot easier to just make a widget area and put a text widget in with the “About Us” info.

Hmm.. I suppose. I just wanted to make the theme incredibly customizable/adaptable.

Thanks.

3135 posts
  • 6 Years of Membership
  • Author Level 3
  • Beta Tester
  • Collector Level 5
+4 more
Daniel_R
says

I need your help pumpkins? that’s a weird title name for a thread, chris…lol

629 posts
  • 5 Years of Membership
  • Affiliate Level 2
  • Collector Level 2
  • Exclusive Author
+4 more
VagrantRadio
says

I’m fresh out of help pumpkins, but you can have my help squash and zucchini.

374 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 2
+4 more
_rohan
says
I’m fresh out of help pumpkins, but you can have my help squash and zucchini.

Hahaha, that’s funny :-)

@OP: This isn’t tough.

Step 1: Add an option to your theme options for the user to choose which page.

Step 2: Use the page ID, and use the get_page() function to get the page http://codex.wordpress.org/Function_Reference/get_page

Step 3: Use the post_excerpt from the returned object to show the content.

Step 4: Optionally, use the get_permalink() function to get the permalink. http://codex.wordpress.org/Function_Reference/get_permalink

Good luck :-)

2258 posts Digital Artist
  • Front Page Master
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
+15 more
crozer
says

Thanks a bunch. Everything is working accordingly now. The only thing bugged, is the fact that post_excerpt does not support page-excerpts (as far as I know), and thus, post_excerpt of a page does not echo anything out, unless I use post_content (but then I have the whole page echoed).

Any ideas?
Thanks again :)

536 posts
  • Affiliate Level 3
  • Author Level 5
  • Collector Level 4
  • Croatia
+2 more
darius9000
says

pumpkiiiiin! it’s meeee, it’s meeeeee! :D

by
by
by
by
by
by