PHP'ing child page links so that I don't have to style every single one

Weeds

SEO Faggot
Dec 31, 2012
83
1
0
198.143.157.115
I'm creating a "viral" post section on my site and wanted to have some code that would add a button style to all the "next" child page links of the topic.

A good example would be "likes.com" (whoever has this site is doing well I suppose, and I would like to emulate).

Here's a page that shows what I want: Apps Every Guy Should Have - Likes

I've done alot of googlin', and have come to the conclusion that I need more than a plugin....

So, can anyone comment about adding a style to a (wordpress) page's link that will automatically show for all sibling (parent/child) pages?

EDIT: I forgot to add the reason why:

I want page views to be high. This site is receiving traffic from facebook ads.
 


Selectors, schmelectors...

Just kidding. Actually, what I wanted was wordpress pages to have next/previous links on child pages, something that doen't normally happen.

I ended up using a plugin: Next/Previous Page Link Plus for WordPress « Plugins « ambrosite web development services

I have tried coding it myself, but it was beyond my abilities.

Once that plugin was installed, I used:

Code:
<div class="previous-link"><?php previous_page_link_plus( array(
'order_by' => 'post_date',
'format' => '%link',
'link' => '<img src="' . get_bloginfo('template_directory'). '/images/previous.png" />',
) );?></div>

<div class="next-link"><?php next_page_link_plus( array(
'order_by' => 'post_date',
'format' => '%link',
'link' => '<img src="' . get_bloginfo('template_directory'). '/images/next.png" />',
) );?></div>
</div>
Now, I can create a viral topic, use it as the 'parent' "page" (like a category), add as many pages under that I want, and have them all link together naturally, using next/previous images that I made.