Questions tagged [pages]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
68 views

How to change the permalink structure of a master page?

Links on the page I use are progressing as follows: http://example.com/image/1 The code I use for Functions.php add_action( 'init', 'wpse316713_pagination_base_rewrite_rule' ); function ...
0
votes
0answers
30 views

How to filter a page title with custom taxonomies

I'm trying to hook a page title using is_page() and its ID 1637 along with two taxonomies serie and area. But I can't get it to work. am I missing something code: add_filter( 'wp_title', '...
0
votes
0answers
39 views

Custom post types & Pages hierarchy - Error 404

I've defined two custom post types: Theme Fiche I've also 7 pages using a defined rubrique template: (template-rubrique.php) Both my Theme and Fiche have an ACF post-object field. The Theme ACF ...
-1
votes
1answer
411 views

custom post type single page template not working

I created a page portfolio and select template Portfolio Template My portfolio page does not access the template-portfolio.php file. In which also includes content-portfolio.php in template parts ...
0
votes
2answers
54 views

Static Page with php echo [duplicate]

I build a static page in my WordPress root folder. Now I'm trying to include a list of my categories with echo clpr_categories_list();. Its not working because I some how have to tell the static page ...
0
votes
1answer
100 views

Wordpress 302 Redirect to Random Product/Post/Page

I'm trying to add the ability to redirect a user to a random product/page/post url similar to example.com/page/random which would redirect to example.com/page/oneofmany. This question is not ...
1
vote
4answers
44 views

How can the plugin directory path be returned into <script> </script>?

How can the plugin directory path be returned into <script> </script> instead of hard coding the path? Here is the custom-page.php: <?php get_header(); ?> <script type="text/...
0
votes
1answer
36 views

How can a .css file be applied to a virtual page?

If creating a virtual page while keeping the theme intact using the following plugin wp-virtual-page-tutorial, how can a .css file be applied to this virtual page? How can this be done using an if-...
0
votes
2answers
30 views

WordPress blog posts template bug [closed]

I'm facing an issue I've never seen before. I fully copied a WP website to my localhost machine and everything was looking fine. When I was trying to make some changes on the blog page template (that ...
0
votes
1answer
10 views

how to put post customized in page

can someone help me please? for example i decide to open web about cooking one of my pages is about posts of how to cook.... the post is full details,but i wanna put only one picture of it (just like ...
0
votes
1answer
19 views

post and page and custom post type

I have been struggling with this, please correct me if I am wrong Posts are used for time sensitive information - like blog posts Pages are used for non transitive information - like about us and ...
0
votes
1answer
30 views

List of pages of a specific user

How to get list of pages of a specific user? And show them in a WordPress page. Say i have page1 , page2 , page3 , page4 created by User1 . How to list them in a page like this: page1 created: 1/1/...
3
votes
1answer
60 views

Why do I need to use The Loop on pages (inside page.php etc)?

This question is addition to the following question. The answers to the linked question say that you have to write THE LOOP inside each php template file, but what is still open is WHY? why is it ...
2
votes
1answer
270 views

How to create a Page alias in WordPress

In the image you see... WordPress has alias for Pages like Home Page, Checkout Page, Privacy Policy Page and any appear beside the page you assign them. How to create this feature in WordPress? If I ...
0
votes
2answers
28 views

Can I link to content dynamically from a page to a new page?

I am new to Wordpress dev, and I have a page that loops through some custom fields(repeater) of people. I'd like each subfield link to go to another page that has more info from that person on the ...
0
votes
1answer
22 views

Display different pages based on form entry

In addition to 3 public pages, my site has 20 private pages, each of which are built for an individual customer. I want a user to be able to come to a public page, enter a customer code, and display ...
0
votes
2answers
473 views

ACF: Echo page title when checkbox is checked

How can I show the title when a checkbox is checked. I use Advanced custom fields my field name is nav This is what i currently have. <?php if(get_field('nav')) { ?> <li> <a href=...
0
votes
2answers
62 views

How to echo every parent page title?

I have like 5 parent pages and would like to echo all their title's on the front page.php. Maybe with get_the_id(); but don't know how.
0
votes
0answers
21 views

Not allow add New Page for role 'editor'

Sorry for my English first. What I want to achive is, that it is possible to change existing posts and not possible to add New Posts for the user role "Editor". Is it possible with wp caps or do I ...
0
votes
1answer
17 views

wordpress custom posts page not showing

In Wordpress I created 2 templates : The first template is a custom homepage The second template is custom page for for post results(search by category, search by keywords) After that I specified ...
0
votes
1answer
32 views

If page or sub page not working as expected

I would like to display a specific dynamic sidebar the the "about" page and its children. From the codex, I have tried the following: <?php // Begin main loop if ( have_posts() ): while ( ...
1
vote
2answers
574 views

Getting a 404 error when clicking edit page

The problem I've run into is the WordPress for my website yesterday randomly stopped allowing us to edit any of the pages. Every time you click to edit a page it comes up with a 404 error. Things I ...
0
votes
1answer
225 views

Use same page-mypage.php template for several pages

How can I use the same page-mypage.php file for different pages, without resorting to page templates?
0
votes
1answer
27 views

How do I customize the post page

I'm currently trying to add an post page on my Wordpress website. I put my new post page as the default post page, on Settings -> Reading. The id of my page is 353. So I created a new php file named ...
0
votes
1answer
42 views

Clicking on a Post takes 10+ seconds for the server to respond, Pages will respond immediately

I recently changed the theme and added https//: to a blog I'm managing. Since then I have found that when I click on a link going to a blog Post, the website takes about 10+ seconds to begin loading ...
0
votes
2answers
27 views

Enabling plugin on specific pages and subpages

To increase the loading speed, I would like to only enable Event Manager plugin on the pages where it's actually used. For that, I wrote this piece of code: // deregister unnecessary plugin scripts: ...
0
votes
1answer
44 views

How to create “custom page types” with different custom fields in them?

I have lots of pages that perform very different purposes in my website (landing pages, thank you pages, regular website pages, webinar pages, etc). As such, I would like to group my pages into ...
0
votes
1answer
21 views

Unregistered taxonomy apears still as emtpy filter list

I unregistered a custom taxonomy form the theme I'm using: function wpse314876_unregister_taxonomy() { unregister_taxonomy_for_object_type( 'page_category', 'page' ); } add_action( 'init', '...
0
votes
1answer
24 views

How to store queried custom data and use it in multiple pages?

<?php $contact = new WP_Query(array( 'post_type' => 'contact' // 'post_status' => 'publish' )); ...
0
votes
2answers
66 views

All Pages visible on the Frontpage

I use the Theme Twenty Seventeen in WordPress to create my website. Here all pages are one below the other seen on the frontpage. Now I added a new page, but this is not listed on the frontpage. I can ...
0
votes
1answer
16 views

How can I send an email when someone uses the HTML download Attribute?

I am using this code (screenshot) to enable someone to download a file from my webpage: Is there a way to also trigger an email and have it sent when someone clicks on the download button?
0
votes
1answer
30 views

If I use a static page-slug.php for a page, is the database still queried?

I wonder how to display a static page in order to increase the page load a little bit: The first option is to put the content in the database (via the Admin GUI), the second option is to create a page-...
0
votes
1answer
182 views

How Do I Find & Remove H1 From Site-Title-Wrapper? [closed]

Good Afternoon, I am having difficulty removing a duplicate H1 tag, which is located in my Site-Title-Wrapper, per source code. When I access "Edit Theme" and load the "site-title.php" I can see the ...
0
votes
1answer
20 views

Adding styles/scripts to specific page

I'm trying to add styles and scripts to specific template, But it's not working. In functions.php I tried: if( is_page_template('file.php') ){} if( is_page_template( get_template_directory() . 'file....
3
votes
2answers
163 views

What is the difference between “post” and “page” in WordPress?

I understood that both post and page are coming under the same post-type but I noticed that both are showing the almost same layout and behavior. could anyone explain in short words? Advance Thanks
0
votes
1answer
18 views

catch urls with specific pattern and show specific content for them by plugin

I have written a shortcode in a plugin that shows some items. my shortcode: [showItems] now I put this shortcode in a page called items: http://mywordpress_site.com/items in this shortcode I only ...
0
votes
1answer
192 views

Inject class in body when particular page template is used

<body <?php body_class(); ?> > In header.php I have written the above code. But I want when this page template is in use: page-customer.php then body_customer class should go above. ...
0
votes
1answer
389 views

Add button linked to single product page on order detail page

I have write a code on functions.php so when customers click a button on order detail page, redirected to product page and review tab of the product they bought. But as a novice coder, I can't get the ...
0
votes
0answers
82 views

How to make “single post” permalink maintain it's sub-page structure

I have a custom post type called "Classes", and I have multiple sub-pages for my site for each different schools classes page (which loops through said custom post type) I.E http://www....
0
votes
2answers
142 views

How to disable delete option for a specific page? [closed]

i found many questions like this but nothing matching to my requirement.Here i need to lock a specific page named settings,not to be deleted by other admins.But it should able to edit. Is there any ...
0
votes
0answers
453 views

Woocommerce product page 404 not found

I don't know what else to try to fix this, i am working on localhost with laragon and i get 404 not found when i go to product link, the url is the same as permalink which i have /%postname%/ and ...
1
vote
1answer
641 views

I Changed the Menu Order, But the Page Order Didn't Change on Front Page

First-timer here! I'm trying to change the order of pages on my boardgame webpage, as displayed on the top banner www.mangakagame.com . Basically, I've used "Edit" in the Dashboard and adjusted all ...
0
votes
1answer
354 views

Python in Wordpress - A “Hello World” implementation

I've read this question (and many more web pages) in order to figure out how to run a simple python script via a Wordpress plugin. However, I couldn't do it: I always get a "Blank" output. No errors ...
0
votes
3answers
158 views

How to select a specific page

I'm having an issue selecting a page. There are guides that tell you how to find the page ID and I just couldn't find it in the admin panel to figure out what the page ID is. If only there was a way ...
1
vote
1answer
25 views

Making a custom help center page

I am working now on a new WordPress theme and I want to make a help center system to allow users that will buy my theme do add helper articles. So my plan is: 1- Make a normal new page and create ...
1
vote
0answers
64 views

Pages views limit [closed]

Is there a option or plugin that can limit a number of pages user can view per month? Im trying to make a site with video and text toturials and I need to limit user to view only 10 lessons (pages ...
0
votes
0answers
22 views

When would it be best to hook AJAX functions on a back-end page?

I'm setting up my page as follows: add_action( 'admin_menu', [$this, 'addAdminMenu' ], 80 ); And its content: public function addAdminMenu() { $this->hook_suffix = add_theme_page( ...
0
votes
2answers
82 views

determine whether content is of type Page or a Post and display accordingly

I'm looking for a way to open every/any link to a blog post in a lightbox/modal globally and without having to any extra classes or rel attribute to the link element. I know I can access this info ...
0
votes
1answer
29 views

How to pass page as an argument like post in WordPress?

I am using this code to pass arguments in posts: $args_automobile_just_launched_bike = array( 'posts_per_page' => 3, 'post_type' => 'post', 'order' => 'DESC', '...
1
vote
1answer
1k views

Can't get page content in WordPress

When I use the the_content() on page-about-us I can't get the content of the about us page from WordPress. I got only below warning Warning: count(): Parameter must be an array or an object that ...