Create a page of links in WordPress

Categories: Wordpress
Envoyer l’article Send article Imprimer l’article Print Article
(No vote)

After you have presented a model of page archive for your blog WordPress, we will now see how to create another page template on, this time, the links page. Although it is quite possible to create it manually, WordPress integrates many functions that are too often poorly understood because little used. Remédions to do so without further delay through this tutorial complete - hopefully on the creation of a model links page.

Creation of the page links.php

With the help of your favorite HTML editor - for example, Dreamweaver or notebook, create a new page that you save as the following: links.php.

Insertion code

In the newly created file, insert the following code and then save everything.

  <? php / * Template Name: Links * /?> <? php get_header ();> <h2> <a href = "<? php the_permalink ()?>" title = "<? php the_title (); >"><? php the_title ()?> by categories </ a> </ h2> <? php wp_list_bookmarks ( 'title_before = <h3> & title_after = </ h3> & title_li = & category_before & category_after = = = 1 & show_description'); ?> <? Php get_footer ();> 

Online file links.php

The most common solution is to use an FTP client as FileZilla or extension Firefox, FireFTP.

For more information on the use of an FTP client, I refer you to codex WordPress (french).

Explanations and possible changes

Display method links

In the end code below, the links will be displayed by categories and under category will be level 3.

Of course, many parameters can be adopted. For a complete listing, see the codex WordPress (in English) about the command wp_list_bookmarks.

Name of the page

  <? php / * Template Name: Links * /?> 

This piece of code indicates the name of the page. Very useful to find them easily!

Thus, for the change online via the publisher WordPress, go to your hotel WordPress panel, click the Appearance tab and then editor theme.

In the list of files, then you should find links.php.

Change the page title

  <h2> <a href = "<? php the_permalink ()?>" title = "<? php the_title (); ?>"><? php the_title ()?> by categories </ a> </ h2> 

In this example, the title of the page links by category. This is linked to the page in question and this is a level 2.

The title of the page is determined at the inception of the page in the editor WordPress. Available you then change the name to your liking!

Same as regards the level of respect - here, level 2, which may be replaced by that of your choice.

Implementation and compliance with the style and structure of page

The code is provided the highest gross of any formatting. If you insert it as it stood, you will surely not the desired result because of the presence of non-tag <div>.

You must therefore show the tags <div> necessary. To do this, you can breathe on the page index.php or single.php.

Again, look for beacons <div class=" "> or <div id=" "> you learn about the CSS classes used in your pages articles.

You can also create a new class CSS specific to your links page. In this case, open the style sheet in your theme - if you're uncomfortable with such changes, make a copy of your files themes.

The tags structure and formatting are to be added between the header (header) and footer (footer):

  <? php get_header ();> 
  <? php get_footer ();> 

Creating the Links page in WordPress

To create a new page in your blog, go to the Write tab and then click on your page panel hotel WordPress.

Get off quite at the bottom of the page to reach the module page template. In the drop-down list, select Links.

Finally, give a title page - for example, Links, then publish without adding additional text.

Tools links with WordPress

The native, several options are available to manage visually - without going through the code, your links in WordPress.

Creating a new link

To create a new link, go under the Write tab, then click Link.

An ultra-complete form is offered to you, what bloggers satisfy the most demanding! Do not worry, you do not have any grasp ;)

Adding categories of links

As you can see, it is also possible to create categories of links in the same way as for your articles.

To do so, either you go by the creation page link - cf. above, or you can use the module Categories ties Manage tab.

Then click on to add one and then fill the appropriate fields.

Management links

To manage its list of links, stay in the Manage tab and then click Links. It is here that you can easily delete, view, modify, and so on.

Appendices

I recommend an excellent article available on the site Webmaster Info introducing various methods to get the best of the page partner with many points on issues referencing.

To see an example of direct application of this tutorial, visit links blog ;)

And you, friends, readers, how did you choose to view your links page? Have you personally?

If you liked this ticket, do not hesitate to subscribe to my RSS!
This article was published Wednesday, September 10, 2008 at 6:41 and is filed under Wordpress. You can follow comments through the RSS 2.0. You can leave a comment, or trackback from your own site.

Related Articles

Promote this article:

  • Facebook
  • Digg
  • Technorati
  • StumbleUpon
  • Google
  • Scoopeo
  • BlogMemes Fr
  • TwitThis
  • Wikio FR
  • del.icio.us
  • blogmarks
  • BlogMemes

2 comments for "Create a page of links in WordPress"

  1. Funnycat said:

    Extra!
    Petit tutorial really interesting and really well explained.
    I am perhaps a little too involved to say it, but honestly the annex which explains how to obtain the best partner of the page will really help avoid seeing pages that are too poorly constructed. : p

  2. Maigret said:
    @ Funnycat: involved? Ah well… if not, I am delighted that this tutorial you like ;)

Leave a comment




* Required field.
French flagChinese (Simplified) flagEnglish flagGerman flagSpanish flagJapanese flagRussian flag

Survey

  • For or against the creation of a chapter on Windows XP?

    • Against (50%, 5 Votes)
    • For (30%, 3 Votes)
    • Do not pronounce (20%, 2 Votes)

    Total Voters: 10

    Chargement ... Loading ...