All Questions
170 questions
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 ...
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 ...
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',
...
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. ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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-...
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 ...
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 ...
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-...
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 ...
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', ...
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 ...
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 ...
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 ?
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 ...
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 ...
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 ...
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 ...
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 ...
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!...
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 ...
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 ...
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
<?...
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....
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....
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 ...
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:...
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 ...
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:...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 (...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...