Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
10 votes
2 answers
8k views

How to display by default only published posts/pages in the admin area?

As it is, WordPress displays by default all the pages/posts in the pages/posts list in the admin area, no matter what their publishing status is. I have a lot of drafts, but usually I'm much more ...
yudayuda's user avatar
  • 101
7 votes
6 answers
10k views

How to disable page delete

My client is not a computer person. I created a website for him. There is some important pages. My client is always delete this page. Then i want to reconfigure the code (the page id). How do i ...
Mifas's user avatar
  • 71
6 votes
5 answers
7k 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', ...
Javier Villanueva's user avatar
6 votes
2 answers
5k views

Create pages automatically if they don't exist

I have a WPMU instance that works less like a network of blogs and more like a holistic application. I'm needing to do a check and see if 3 pages with the slugs 'home', 'login', and 'password' exist. ...
Jake Lisby's user avatar
5 votes
3 answers
5k views

Using single.php from plugin folder instead of default template folder

I am trying to figure out how to use another single.php for a custom plugin I'm making. It's for a custom post type. Because if people install this plugin, they won't have the custom single-product....
user3428971's user avatar
5 votes
3 answers
476 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 ...
Alex's user avatar
  • 489
5 votes
2 answers
12k views

Replace existing pages with new pages, keep menu links

I basically want a plugin or method that would give the same functionality as 'Enable Media Replace' but for replacing pages and posts, instead of redirecting, or manually editing. I've searched high ...
bobsya's user avatar
  • 63
4 votes
1 answer
4k views

Create page when plugin is activated

I've made so that everytime my plugin is activated it's supposed to create a page. Although i want it to only create the page if it doesn't exist from before. But what it's doing is that it's creating ...
Jake Snake's user avatar
3 votes
2 answers
8k views

Change admin startpage to Pages-page?

When you login to the admin you see the Welcome page by default. A client of mine requested to see the "Pages" page by default, he had seen it somewhere else. Is this possible, and if so, how? Tried ...
qwerty's user avatar
  • 665
3 votes
2 answers
6k views

TV Show database - Best way for structuring it?

I want to make a TV Show database in Wordpress that has this URL format: /tvshows/friends/01/12/ /tvshows/ would list all series /tvshows/friends/ would list all the seasons available for Friends TV ...
Xavi Esteve's user avatar
3 votes
1 answer
3k 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 ...
Fraggy's user avatar
  • 248
3 votes
1 answer
245 views

Editing the Number at the end of Page URLs / Editing Page Slugs

I am playing around with wordpress and a few plugins. Say I have something called "Shopping Cart" and I delete the page. Then I recreate it, I can't have the old URL back. I get domain.com/shopping-...
Noah Clark's user avatar
3 votes
1 answer
307 views

Pagination Help on Crazy Custom Authors Page

I've got a custom authors page for a multi-author blog. http://blog.securitytechnologies.com/meet-the-team/ Here's the code I'm using to generate the page (thanks to other folks in the support ...
Matt Chandler's user avatar
3 votes
1 answer
95 views

Page load requires a trailing "/" [closed]

I have a new problem today which I didn't have yesterday. Nothing in my code had changed, which is the most confusing part. (Which means the error maybe started before some kind of cacheing?) None ...
Brian Feeney's user avatar
2 votes
1 answer
9k views

Programmatically add a custom page/path/url/route to WordPress

Conceptually what I want to do is super simple. In my plugin, I want to add a single path/route to my wordpress site: [mysiteurl]/testpath ... that loads a particular file, like: [filepath-to-my-...
ChrisNY's user avatar
  • 211
2 votes
3 answers
4k 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 ...
Jody Heavener's user avatar
2 votes
1 answer
703 views

Virtual Pages plugins

I having hard time to make work the plugin Virtual Pages (WordPress plugin to ease the creation of virtual pages) I did have edit to create a loop based on a query. add_action( 'gm_virtual_pages', ...
Groupe Wibi's user avatar
2 votes
1 answer
12k views

How to merge all my pages into one, while keeping a menu bar?

I have currently a website with a basic organisation : 5 different pages ("About us", "projects" ...etc.) with a typical menu bar. I would now like to have all the pages into a single one. 1) How can ...
Inès Joubert's user avatar
2 votes
2 answers
3k views

Static files or dynamic WP pages for "static content"?

Ok = I've looked around a lot for a clear answer to this, but find very few real answers. I would really appreciate some info from experienced individuals. A tiny bit of background. I've worked ...
Bosworth99's user avatar
2 votes
1 answer
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 ?
mike23's user avatar
  • 6,029
2 votes
2 answers
32 views

What is the most idiomatic way to let clients edit phrases in HTML?

I added HTML banners to the top of certain pages on a client's site. He wants to make edits to the text phrases on these banners without having to edit any HTML. How do I open this up for him? In the ...
Lincoln Bergeson's user avatar
2 votes
1 answer
1k 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 ...
kine's user avatar
  • 163
2 votes
1 answer
180 views

How to change URL Custom Page?

My Page Custom URL: http://abcd.com/watch?name=video-title How can I change this url to http://abcd.com/watch/video-title where watch is a custom page? My functions.php code: function ...
Kenan's user avatar
  • 57
2 votes
1 answer
393 views

Distributing and packaging plugins

I have a project where I'll be using WP as a customer portal to an external application. The application is accessed via web services (soap/xml) calls. The application has quite a few forms and for ...
user44021's user avatar
2 votes
1 answer
358 views

Delete pages and Create default pages for all new network sites

I am using the following code to delete some default pages and to also create some default pages for all new sites that are created. It work as is now but that is only because I purposely have a ...
730wavy's user avatar
  • 193
2 votes
2 answers
5k views

Remove specific page/post from feed

I'm working on a website with lots of tutorials/pages. I have made a separate rss feed for the pages - works fine. But then I had to create a sitemap (a page), and it shows up in my "pages" rss feed!...
Nick's user avatar
  • 37
2 votes
2 answers
2k views

Is there any Wordpress alternative to Book module of Drupal?

Wordpress can be used as CMS. So, I think I can switch from Drupal to Wordpress. I'm looking for a book module alternative for creating structured document. If you don't know about Book module of ...
user931's user avatar
  • 321
2 votes
0 answers
2k views

redirect product-category to a custom page

I hope you can help me. I've made one page for each woocommerce category I have in my store with a specific design. The problem is that when you click on the link of the product-category to which a ...
blaufant's user avatar
1 vote
2 answers
6k views

custom headers for static home page and posts page

have a site w/a static home page and a posts page and then a number of other static pages - i set up a custom header for the home page and then another all other pages like this in the header <?...
j1mmy's user avatar
  • 11
1 vote
2 answers
125 views

Copyright messages for a particular set of pages

I have created some pages (not post) in wordpress related to my college notes. I would like to display a copyright message of the college on this pages, but I don't want do this manually every time....
Searock's user avatar
  • 137
1 vote
3 answers
252 views

Static posts page with home.php

For my website, I am using a static home page page Home (template front-page.php) and for posts- page News (template home.php) I need to show all the post titles and exceprts on that page News (templ....
jam's user avatar
  • 173
1 vote
2 answers
684 views

Associate Page with User

We currently have a setup where anyone can register as a user and their own 'page' gets created manually by admin. We need a menu option to be something like 'View Your Page' and direct a user to ...
user avatar
1 vote
2 answers
30k views

Custom page template not working

I followed this tutorial for the page specific template -- http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates Created a page through wordpress admin panel - Blog Page URL like -- http:...
swapnesh's user avatar
  • 179
1 vote
1 answer
1k views

in_category() works in single.php but not in page.php?

I'm using in_category(array) inside The Loop to detect whether a post is categorised into the Discussion category (or has one of a couple of slugs). This works beautifully on single.php but doesn't ...
Chris Woods's user avatar
1 vote
2 answers
94 views

Posts vs. Pages

Okay so I've spent the last few weeks (on my spare time outside of work) creating a site for a client with a custom built theme. This is my first use of wordpress and the site can be seen here at http:...
kaitie's user avatar
  • 13
1 vote
3 answers
928 views

Show posts on a page based on a category and tag(s)

I have been looking all over the internet for this, and have not yet found an answer I could use. Found out that I may can use something called query_posts or get_posts, but I have no idea how to use ...
Filuren's user avatar
  • 151
1 vote
1 answer
26 views

Split Conference Wordpress Page in different years

let's assume I have a page called conferencepage2018.page This would be a bad way of doing it since the conference is being held every year. What am I supposed to do if I want to split the Wordpress ...
Preprocezzor's user avatar
1 vote
1 answer
3k views

View Private Published Page with URL Code (no login required)

The goal is to easily allow for larger entities/clients to review content without having to have a user login/account for every project stack holder involved by providing a single URL to the final ...
Amber Lynn's user avatar
1 vote
3 answers
2k views

Add google org chart to wordpress page

How do I display this page in a Wordpress site? What do i need to add or remove? This is for a static page not a blog post. (FYI: I want to use this to display a family tree on my website). I'm a ...
user avatar
1 vote
0 answers
136 views

Block Theme: How to use a different template on front page vs paginated pages?

I'm using block themes. I'd like the front page / home / index to show some extra blocks plus the list of blog posts. However, I want the paginated pages (e.g. /page/2) to not have these extra blocks ...
TLR's user avatar
  • 11
1 vote
1 answer
656 views

How to get custom page template being edited in gutenberg editor

I want to know custom page template name (the one chosen in page attributes - template) in PHP, before page opens in order to enqueue additional scripts according to chosen template. I know how to get ...
Lovor's user avatar
  • 986
1 vote
1 answer
331 views

Run plugins only on certain pages

I want to use my personal plugin only in some pages. If I remove the add_action function ('the_content', 'my_plugin_content'); the plugin does not show me the content of the other pages that are not ...
Luca's user avatar
  • 19
1 vote
1 answer
248 views

Adding buttons to Add New Post and Add New Page

I want to add a button in Add New Page and Add New Post pages. Here are places I want to add items: New page's sidebar (next to Page Attributes). New post's sidebar (next to Post Attributes). New ...
antwon's user avatar
  • 13
1 vote
0 answers
35 views

Selecting An image from the Media LIbrary on the frontend

I'm using Wordpress to create a research tool where archival documents are transcribed into a relational database. Part of this is a transcription interface, a custom page. What I'm trying to do (...
Sam McLean's user avatar
1 vote
0 answers
27 views

Control Content On Non-Blog Pages

I'm new to WordPress, trying to learn it's capabilities. My Goal My goal is to make a normal website but have it's content (text and images) be adjustable by the user / client, managed content. An ...
Kenny's user avatar
  • 125
1 vote
1 answer
287 views

custom meta box for page default template

I'm having issues getting some custom meta boxes to display on the page default template. I want these meta boxes to only display on the default template and disappear when the user chooses a ...
lblankenship's user avatar
1 vote
1 answer
725 views

Create subpage /user/ or /my-profile/ like /author/ with additional query like /user/user123

I am creating some project and because of task, I need this: domain.com/user/user123 - return profile of "user123" with his personal info domain.com/my-profile - return profile of current logged ...
Doctore's user avatar
  • 13
1 vote
1 answer
53 views

Best practice - pages - ACF or inline coding

I would like to migrate the following website to WordPress (http://www.absoluteblast.com.au). What is the best practice to implement the service pages? --> I thought to create a custom template which ...
Dusty48's user avatar
  • 163
1 vote
1 answer
312 views

How to hook up search results page to a back-end page?

On my site, editors can upload "banner" images to every page on the site. However, I'm having trouble figuring out how to link the search results page to a back-end page (ie the page that appears at ...
John's user avatar
  • 13
1 vote
0 answers
51 views

How to structure model showcase

I need to make a website of models that contain the following components: Model page - model info, editorials of that particular model Editorial page - containing some editorial info, link back to ...
Georgi Demirev's user avatar