Hola
Acceso Premium
Casos prácticos

Segundo caso práctico

11 de enero, 2017
0 comentarios

Linking to Your Search Page

You can now make a link to your custom Search Page in several ways.

Using the Page ID

Whether or not you use permalinks, you can link to your new Search Page by using Page ID number of the Page. Insert the next line into your any posts, pages or templates

<a href="index.php?page_id=17" title="Search Page">Search Page</a>

OR you may insert the next line into templates

<a href="<?php echo home_url(); ?>/?page_id=17">Search Page</a>

Using the Page Slug

The Page slug is set in the Edit Page screen. It is the name of the page if you are using Permalinks. You can manually change this. An example of a Page slug link would be:

<a href="/wordpress/search-page/" title="Search Page">Search Page</a>

for any posts, pages or templates when slug is ‘search-page’. OR you may insert the next line into templates

<a href="<?php echo home_url(); ?>/wordpress/search-page/" title="Search Page">Search Page</a>

Using wp_list_pages()

If you are using the wp_list_pages() template tag, the page name would be automatically generated in your Pages list.

Los comentarios están cerrados.