Pages are static, timeless content that are unique from the regular blog chronology.

learn more… | top users | synonyms (1)

21
votes
3answers
27k views

Get page link from slug?

Is is possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using get_page_link(): <a href="<?php echo get_page_link(40); ...
18
votes
10answers
1k views

Contact Form on WordPress Sites?

How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress ...
11
votes
1answer
508 views

How to configure WordPress to handle 75,000 pages?

I have a large site that's using WordPress. We have 75,000 pages in the site so far, and it's performing well on the front-end. The issue is that if anyone on our team touches the page editor ...
10
votes
3answers
3k views

Custom Post Type Slug / Page Slug Conflict - Prevent use of reserved slug on page save?

I have a custom post type of portfolio (slug portfolio) in my theme and all is working well except one thing. When people create a page with a slug of portfolio, eg: example.com/portfolio, the theme ...
10
votes
2answers
360 views

How can I keep the content of my pages version controlled?

We have a WordPress-based website that provides documentation to our REST API. Since our API is constantly changing, so is the documentation. However, we would like to keep the documentation version ...
9
votes
1answer
4k views

Check if we're on the wp-login page?

How can I check if the current page is wp-login.php or wp-signup.php ? Are there more elegant solutions than using $_SERVER['REQUEST_URI'] ?
9
votes
1answer
3k views

Customizing the URLs of WordPress Login and Sign-up Pages?

I have Multisite installed. I have whitelabeled it using the Whitelabel-CMS plugin, but I can't customize the URLs of the sign-up and login pages. Can I change the URL of my multisite's login page? ...
8
votes
4answers
2k views

What methods to use to create small, editable pieces of text for static pages?

For many of the sites I do for clients, the designers will make pages with small pieces of text in various places. For example, the home page will have a headline, a tagline, and a small box with ...
8
votes
2answers
4k views

Integrating a custom post type into a page hierarchy

I'm creating a theme with a custom post type for team members, I've also got the following page structure: about <-- this is a page about/team-members <-- this is a page, lists all the team ...
6
votes
1answer
605 views

Stop WP from creating “Sample Page” and “Hello World!” post

Is it possible to stop WP from creating the "Sample Page" and "Hello World!" post when creating a new blog?
6
votes
1answer
561 views

How to load javascript on custom page template?

I have a custom page template where I would like to load some javascript. I suppose I could always include the javacsript in the actual file, but that seems ugly. Is there any way to identify if ...
6
votes
2answers
3k views

Any guides on creating custom admin pages?

I basically want to create a table (preferably AJAXified) that lets the user enter a line of information, and be able to add new lines of information, and delete selected ones. I've found this post ...
6
votes
2answers
2k views

How to check if I'm on the last page of posts?

I want to display some text on the last page that isn't displayed on the other pages. For example, on category pages: url.com/category/categoryname/page/6 or last page of all posts listed on the ...
6
votes
2answers
365 views

How to add a new tab to page editor

Anyone knows how to achieve this? It has something to do with meta boxes, but I just can't figure out the proper syntax.
5
votes
4answers
24k views

Proper way to get page content

I have to get specific page content (like page(12)) I used that : <?php $id=47; $post = get_page($id); echo $post->post_content; ?> Work nice execpt for compatibility with qtranslate ...
5
votes
1answer
571 views

Page returns 404 with POST variables, but not without

I have a problem with my page. I'm trying to make a "Contact Us" page. It's working perfectly fine design-wise. But when I try to send the form to the same page as origin. It returns 404 error. It ...
5
votes
8answers
9k views

Is there a way (plugin?) to restrict a user to being able to edit just one page?

We use wordpress like a CMS and would very much like to allow users to have a "homepage". Ideally they'd be prevented from mucking up the whole site. Is there a simple way to limit users editing ...
5
votes
1answer
16k views

How to enable custom fields for pages (if not a bad practice)?

My main page has a intro image beside the main content. I would like to add that image using custom fields. I've noticed that pages don't have. I would like to enable them. Is it a bad practice?
5
votes
2answers
1k views

How to Remove all Instances of edit_post_link

Can someone please assist with how to remove from my theme, whilst in author mode, the edit_post_link (Edit link), throughout all my pages. Which php files in the Twenty Eleven theme (WordPress v3.2) ...
5
votes
1answer
1k views

Running a python script within wordpress

I have a WordPress install for a personal blog and I'm gradually porting all of the little web bits I have written over the years to pages on the blog. One such page is ...
5
votes
2answers
269 views

Allow only new sub-pages to be created

Here is an amazing solution to restrict the creation of new parent pages, and I would want to use it, but the newly created sub-pages are saved only as drafts and this was not solved (see last ...
5
votes
4answers
1k views

A way to automatically install pages on theme install?

I'm trying to build a theme which would require specific pages to be included. Is there a way to automatically create pages and assign them to their page templates when a theme is installed?
5
votes
2answers
3k views

Getting only direct child pages in WordPress with get_pages

I am trying to fetch all direct children of a page. But I am getting all children and grand children as well. Any ideas? PHP Source: $args = array( 'child_of' => $post->ID, ...
5
votes
1answer
222 views

multi page password protection

Is it possible to have the "password protected page" feature of WordPress apply to more than one page? I have dozens of pages which I wish to protect with the same password, but I don't want people to ...
5
votes
1answer
406 views

Create a “Dummy” parent page for a hierarchy in page listing?

Is it possible to set up a "dummy" page - just a page title that appears in the page listing, and a page that is not editable and doesn't have a slug? This is more of a hypothetical question, as I ...
5
votes
3answers
700 views

Can I display submenus in groups, using wp_list_pages?

Say I have top-level(parentless) pages called Fruit, Animals, Cars. When, say, Fruit is selected I would like to show links to the individual fruit pages below. I would like to be able to dislpay ...
5
votes
3answers
3k views

WordPress admin screen very slow / timing out when editing or adding a new page/custom post

I'm new to the site but appreciate any help you can give. I have a WordPress set-up which (rightly or wrongly) has hundreds of pages and thousands of another custom post type which is also based on a ...
4
votes
3answers
8k views

Get page content using slug

I'm trying to get page content when I only know the slug string. Is there a function for this, or an easy way to do this or is this a case of doing it via SQL? Thanks very much
4
votes
2answers
237 views

Automatically remove trashed pages from nav menu

As it is now, when a page that is in the nav menu is trashed, it still stays in the menu until manually remove via the nav menu editor. Is it possible to have trashed pages removed automatically? ...
4
votes
4answers
3k views

wp_nav_menu: show menu only if one exists, otherwise show nothing

I'm trying to use wp_nav_menu to only display a menu if one exists, otherwise, display nothing. If I delete the menu, it will output a list of the pages. My functions.php file contains: if ...
4
votes
5answers
2k views

get_pages() not ordering as it should

I'm using get_pages() function to get all subpages from a page like this: $childrens = get_pages(array('child_of' => 7, 'sort_column' => 'post_date', ...
4
votes
6answers
878 views

Can Wordpress realistically handle a site with 500 'pages'?

I'm building it from scratch and probably a 100 or so of those pages will be ecommerce. I would like to create meaningful, normal looking permalinks for aesthetics and SEO. I would really love to ...
4
votes
2answers
261 views

Delete Associated Media Upon Page Deletion

Note Use at your own risk, it is buggy and I have run across a couple instances where it would delete ALL attachments. Unsure why. Is it possible to delete media associated with a page when that ...
4
votes
2answers
2k views

Get top level page parent title

How do I get the page title of the upper most parent page of the page the visitor is currently on? Let me describe: I have this page structure: Example Title 1 Example Title 1-1 Example Title ...
4
votes
4answers
1k views

What is the best page ordering plugin that works well with WPML?

The title says it all. What is the best page ordering plugin that works well with WPML? It seems that may are reporting issues with different plugins such as my page order and WPML page order. ...
4
votes
1answer
567 views

Create a page without adding a page in the Database

I am trying to include a special Archive page with my theme, right now I have a PHP file with Template Name: Archives Template at the top and I the user must create a blank archive POST PAGE and ...
4
votes
1answer
3k views

Pages: frontpage.php, home.php, posts page etc

When do I use the following: home.php frontpage.php Under Settings > Reading Settings Front Page Posts Page I wish to clarify this as I find myself using "Placeholder Pages", empty pages just ...
4
votes
3answers
977 views

Posts in multiple Categories different single.php

I am smashing my head against some code. Here is the situation: I have one post in 3 different categories, this post has to be visible in "category 1" with the single1.php, in "category 2" with ...
4
votes
2answers
4k views

Sending the reset password link programatically

I have this manually created page: $user_login = sanitize_text_field( $_GET['user_login'] ); if ( username_exists( $user_login ) || email_exists($user_login) ) { ?> <!--Everything has been ...
4
votes
3answers
284 views

Editing Complex Pages in Visual Mode

This might be a stupid question, and maybe I've missed some best practices thing, but I've been having this problem with clients using sites on WordPress. Let's say we have a fairly complex page that ...
4
votes
3answers
429 views

How to embed page content in a blog post

I've built an HTML table that is posted on a page in my site, and I'd like to use that same content inside a blog post (something of an announcement of the table's publication). The table is likely to ...
4
votes
1answer
1k views

Passing variables through permalink structure

I have a WordPress page which is accessible via /accommodation/. What I want to be able to do is pass in a parameter using the URL - ie going to /accommodation/value1/ would load the same page as ...
4
votes
2answers
8k views

Get content from one page and show it on another page

So, I've been googling and reading and testing and failing. I'm fairly new to php, so don't expect to much :) I'm working on a new design, and I want to show content from the about page on my ...
4
votes
2answers
1k views

Page as child in custom post type slug?

I have the following structure: /projects (archive of cpt projects with template archive-projects.php) /projects/project-1 (single view of cpt with template single-projects.php) /projects/downloads ...
4
votes
2answers
90 views
+100

Can I display the widget admin in the page admin?

I would like to show the 'Appearance -> Widgets' menu underneath the text field in 'Pages -> new/edit'. Is it possible to take one part of the admin and show it elsewhere? Reading some of the ...
3
votes
3answers
15k views

How to retrieve the slug of current page?

I am trying to retrieve the slug of the current wordpress page outside the loop. The title of the page returns with wp_title () but how can I get the slug? <li><a ...
3
votes
3answers
4k views

How to add a specific widget to only 1 page?

I would like to show a widget in only one page of my site, as i can see it is not possible right? Should i add that for all my site pages or not?
3
votes
3answers
3k views

get_children() Not Working with orderby Parameter

I am trying to use the orderby parameter in the get_children function as below: $navigation = get_children(array( 'post_parent' => $parent->ID, 'orderby' => 'menu_order' )); But it is ...
3
votes
3answers
3k views

Hook for post and page load

I need to run a function when a particular post or page is loaded. Is there any hook that lets me check whether a post is being displayed during page load ?
3
votes
2answers
3k views

Multiple areas of dynamic content in a page

I am new in Wordpress and what I really can't find how to do is the following: I have a new Page created from the CMS. This pages have different modules with text. Take for example this template ...