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

learn more… | top users | synonyms (1)

2
votes
2answers
2k views

Displaying Child pages of the current page in post format and their thumbnails (featured image)?

I'm using the following code I got from the Wordpress codex: <?php // Displaying Child pages of the current page in post format $mypages = get_pages('child_of='.$post->ID.'&...
2
votes
1answer
131 views

Targeting specific pages in the loop

I am having a custom query that calls in pages in an array like so: <?php $args = array( 'post__in' => array( 2, 7, 9, 11, 13 , 15, 17 ), 'post_type' => 'page', 'orderby' => '...
2
votes
2answers
346 views

wordpress with many custom styled static pages

I am creating wordpress that constists of many many custom styled static pages. Some has tables, some has text+iages etc. - so each page has almost unique style with some commonalityes, of course. So ...
2
votes
3answers
5k views

Add input field to 'Pages > Edit Page' through functions.php

Original Question: I'm trying to add an input field to 'Pages > Edit Page'. The use of this input field will be for a user to add an ID of a slider, so that that slider will be page specific. ...
2
votes
1answer
5k views

Get page id by title?

I'm using the following code to insert the content from another wp page into my main home page. Is it possible to make it work with a page title instead of an id number? Eg. Not $page_id = 518 but ...
2
votes
3answers
3k views

Notify admin when page is edited?

I found this previous post to automatically notify the admin when a post or page is published: Alert Email when any Post or Page is Changed Works like a charm, thanks! However, it looks like the page ...
2
votes
3answers
5k views

Display posts by tag on page

I'm trying to create an advanced WordPress page that shows the regular content, plus a second section on the same page that shows the latest posts from X tag. For example, a page is created about "...
2
votes
2answers
378 views

Make custom post type display as a page

I am trying to make my custom post type display on the front end as if it were a page. Depending on the theme, it won't have the date, author, etc... I've looked into creating a template such as '...
2
votes
2answers
5k views

Where and how to put inline js in pages

On the internet there are thousand of articles on how to insert external scripts using wp_enqueue_script(). Anyway i didn't find anything explanatory on how to add inline, <script> enclosed, ...
2
votes
3answers
4k views

the_excerpt() not showing manual excerpt for Pages

I have enabled the excerpt feature for pages in my wordpress theme - add_action( 'init', 'my_add_excerpts_to_pages' ); function my_add_excerpts_to_pages() { add_post_type_support( 'page',...
2
votes
3answers
1k views

Automatically create pages in a post based on number of words

I need a method to automatically create pages (using <!--nextpage-->) in posts based on number of words. For example... A post containing 1200 words should be broken down into 6 pages with ...
2
votes
3answers
196 views

Get only the grandchildren, not the direct children of page/current page?

I know javascript pretty well now but I am new to php and wordpress theme building. I have searched a fair bit and can't find a solution to something that seems like a pretty simple task, all I would ...
2
votes
1answer
128 views

How to highlight the current page in the nav menu?

I'm customizing a WordPress theme for my school, and I'm a bit annoyed by the fact that the current page in the nav menu is not indicated. For example: You can clearly see that I'm hovering over a ...
2
votes
1answer
95 views

PHP Script within wordpress theme

I have a php script that I'd like to utilize within my wordpress theme. I'd like to restrict access to the page based on users belonging to particular groups so it's important to keep it within ...
2
votes
3answers
912 views

Can I hide a specific post from latest posts page?

Let's say that I have a post that I only want to be shown in the page of the category that it belongs to. The problem is that this post is also visible in the latest posts page. Is there a way to ...
2
votes
2answers
242 views

Show pages and articles in category search result

I'm using "Map Categories to Pages" to add categories to pages. When I call the link http://mypage.com/category/catA+catB I get all my articles, that are associated to the categories catA and catB. ...
2
votes
3answers
621 views

What are the differences between “Latest Posts” and “Static Page”?

WordPress has an option to pick "Latest Posts" and "Static Page" under "Settings" in Admin Panel. My questions: What page template is getting loaded in each of those modes? Why paged stops working ...
2
votes
2answers
691 views

How to make certain page templates visible to admin only

Making a site for a client, I have some pages that the client won't be able to edit or delete. These pages rely on specific page templates. However, I don't want these templates to be available for ...
2
votes
1answer
193 views

Only allow new subpages to be created

I'm looking for a way to only allow users to create new subpages once there are nine pages that are parents/root pages. Once there are nine parent pages when trying to create a new parent the users ...
2
votes
1answer
70 views

Putting footer content in a “page” - Doing it wrong?

So, in my shortish WordPress development career, I've gotten in the habit of creating a "page" for the content in a footer, and adding different fields with the wpalchemy class. Everything with this ...
2
votes
2answers
5k views

Is there a way to lock certain pages from being edited by anyone other then the admin?

I have built a WordPress site and theme and have several pages that I do not want editors to edit. However, there are other pages that I want them to have access to to edit. Is there a plugin or code ...
2
votes
2answers
14k views

Show posts of category in a page

I would like to be able to display all the posts in a certain category on a page so that all posts are on that one page and there is no pagination. If possible, I would also like to display a short ...
2
votes
1answer
11k views

how to display the wordpress login and register forms on a page?

I have a wordpress site. Which has the built-in login form with the url http://domain/wp-login.php and register page http://domain/wp-login.php?action=register. As these pages have no sidebar and ...
2
votes
1answer
1k views

Enqueuing Script in functions.php vs on the page

Does it matter if I enqueue a script on just the page I need it to be used? As opposed to functions.php? Or, what is the best practice? In this example I need a rotator just on the front page of my ...
2
votes
2answers
71 views

Editing Pages that Have Already Been Published

Sorry for the simple question. I've published a page. Let's say that I now need to make changes to the page. Can I simply edit it, after it's been published? Or should I use a maintnenace mode? If ...
2
votes
1answer
2k views

How to add pages to feed?

I'd like to include Pages in my RSS feed. Whenever I add or edit a page, I'd like it to show up in the feed. I can't seem to find any setting in the default WordPress installation or in the default (...
2
votes
1answer
129 views

Help with a custom page template - listing contents of childpages?

hey guys, I have no idea how to solve the following problem. I'd love to have a page-template that lists all it's child-pages but with the content. e.g. Imagine I have a page called "WORK. And "Work" ...
2
votes
1answer
1k views

Can I apply a WP theme to a specific custom page template?

One section of my website is going to be completely different visually than the rest of the pages, is there a way to apply a WP Theme to specific page templates ?
2
votes
1answer
2k views

One page - Multiple parents?

I'd like to have the same pages assigned to two different parent pages, to save me making separate pages for two sections that contain mostly the same info. I'm using the WenderHost Subpages widget to ...
2
votes
3answers
2k views

wp_list_pages doesn't work in hierarchical custom post type

I've been bashing my head against my desk all afternoon trying to figure this out. I've got a custom post type all set up, with hierarchical set to "true" and I can assign parents and see the ...
2
votes
1answer
31 views

Registering multiple sidebars with data from an array

I am attempting to dynamically register sidebars for certain pages. The pages must meet the following criteria: be published be a page (not a post) use the template 'template-generic-sidebar' In ...
2
votes
3answers
827 views

Why does `url_to_postid` return 0 when testing `page_for_posts` Page?

If I set Reading Settings > Posts Page (in other words, the page_for_posts option) to a static page, and then attempt to pass its URL through url_to_postid() it will return 0 - why is it? I ...
2
votes
2answers
2k views

Set Session Time Limit for Password Protected Posts

I have made a series of posts and pages password protected on my website using the built-in Visibility setting. They all use the same password, so the user can view all of them after entering the ...
2
votes
3answers
198 views

Create WordPress pages with PHP

I'm using MongoDB to store separate data for a WordPress website and need to be able to create pages with the data from MongoDB rather than from manually created pages in the dashboard. I've searched ...
2
votes
1answer
659 views

CMS: Making complex pages editable by the end user

I have been tasked with re-creating a small-ish corporate Web site (maybe a dozen static pages and a blog section) using WordPress. I have no troubles with the actual Web design, nor with the PHP ...
2
votes
1answer
333 views

Do I really need the div class entry?

I was wondering if it's really neccessary to keep the <div class="entry"> in the page.php file (or any other template for that matter). I typically use a blank HTML5 wordpress theme and it doesn'...
2
votes
1answer
6k views

Restrict admin access to certain pages for certain users

As the title says, I'd like to restrict back-end access to certain pages for certain users. While doing a site with 45-50 pages, I realised it would be a much better user experience if the Page menu ...
2
votes
1answer
33 views

Redirect to a page if ancestors is empty

I have this script to get the ancestors ID //Get root ID $post_id = $post->ID; $ancestors = get_post_ancestors($post_id); I would like to make a redirection if it's empty to a specific page ID ...
2
votes
2answers
2k views

Can I include Javascript/jQuery in a page?

I'm extremely new to Wordpress, and I've offered to help out with a project that uses it. In a new page I'm creating, I need to use javascript/jQuery to write out the html dynamically - it doesn't ...
2
votes
2answers
904 views

posts page - different lengths of excerpt

is it possible to get wordpress on the posts page to do the following example. the first three posts need to have a large image spanning the width of the title box and a longer excerpt. the rest of ...
2
votes
1answer
930 views

Different fields in My Profile page depending on user role

So I understand that I can user current_user_can to check the role of the current logged in user. But what I would like to do is show these different fields to the site Admin. So for example the ...
2
votes
1answer
539 views

What is the optimal way to filter out subpages from admin?

I guess it's always possible to hide them with js, but is there a code snippet out there for query level child page filter? I only want top level pages to remain. EDIT: my coder came up with it, stay ...
2
votes
2answers
516 views

Modify built-in post type properties

I have an unusual situation where I need to make the built-in post type 'page' non-hierarchical. I printed the post type object with var_dump(get_post_type_object('page')); die; and I got this: ...
2
votes
1answer
1k views

Auto create pages on WordPress multi site register

I'm creating a multi site and would like to have: A few pages that are automatically created with the new site (at the moment only the default home and sample page are created with a new site, ...
2
votes
2answers
897 views

Check to see if page exists problems

I've created a class to dynamically create pages. I'm checking to see if the page exists by comparing the new page's title to post_name. The comparison seems to work ok, but even if there is a match ...
2
votes
1answer
135 views

When I split a large post with <!--nextpage-->, how can a search locate users to the correct page?

I have a large post split with <!-- nextpage -->. A term resides on page 50. When I search for the term, I land on page#1. Q: How can the system auto-forward me to page#50? Thanks
2
votes
1answer
689 views

How to change post to page

If I have to change a number of posts to pages, does this require anything more complex that setting the post-type to page on the table wp_posts? Do any other settings need to be changed. Is it ...
2
votes
2answers
108 views

I made a custom page but Wordpress seems to strip any HTML I put in this page

How can I avoid wordpress stripping HTML content from a custom PAGE?
2
votes
1answer
1k views

[Plugin: Posts 2 Posts] How does it work?

I recently discovered Scribu's Posts 2 Posts plugin, which seems to be exactly what I was looking for in order to connect pages and posts for a big editorial website. But I cannot get it to work, ...
2
votes
3answers
234 views

Guidelines for adding static pages

I'm attempting to convert an existing site to Wordpress, mainly for the following reasons: a) I want to add new News & Blog pages and b) so other people can make occasional simple changes to the ...