Questions tagged [pages]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
2k views

Show only top 3 posts from 3 categories in order on home page

This function will show the last 3 posts from any category on front page: // Only top 3 posts from CHR category add_action('pre_get_posts', 'ad_filter_categories'); function ...
0
votes
3answers
6k views

auto create only 1 wp page in activate custom plugin

I am using this code to auto create a page when I activate my plugin.. function insert_page(){ // Create post object $my_post = array( 'post_title' => 'My post', '...
-1
votes
1answer
20 views

When and how will php code in a user made Wordpress page be executed?

What I have understood about what's happening when a web page in a Wordpress built web site is loaded is that Wordpress determines which post (page) and which template for that page to load. It then ...
3
votes
1answer
3k views

why does HTML Tag not working in Post and Page

Though this is not a programming related question but I am facing a bitter experience with this WordPress problem. the problem is HTML Tags are not working in my website. See the images
0
votes
2answers
18 views

How to hide a page in wordpress made for menu

I'm trying to completely disable access to my parents page menu. For example, I have a menu made like this : parent page -> child page 1 -> child page 2 I made a real page for 'parent page' ...
0
votes
0answers
5 views

How to change custom paginated URLs using PHP code

See our website has pagination URls like below https://www.xxxxxxxx.com/xxxxxxxx/yyyy/zzz/?xx_xxx_page=2 https://www.xxxxxxxx.com/xxxxxxxx/yyyy/zzz/?xx_xxx_page=3 https://www.xxxxxxxx.com/xxxxxxxx/...
0
votes
1answer
10 views

How can I check if a post with a particular slug or title exists?

I want to know if a particular page exists. I'd like to check against either it's slug or it's title. There is a function called 'post_exists'. But this function seems to only work if it's invoked in ...
0
votes
1answer
1k views

Include images from pages in wp search.php results in default wp search

Is there a way to include page images in wp search? Like I want to search through my sites images on pages not in posts by caption/alt text and display them in the results page as thumbnails.
0
votes
1answer
806 views

Hierarchical List Pages as a table

I need to generate a list of all Wordpress Pages and have them display in a HTML Table, that will be printed for offline use. First column is Blank Second column will have the Page Creation Date ...
0
votes
2answers
35 views

Add a searchbox to the body of a page

I'm creating a website in which I need that, when I click on one of the tabs of the specific menu, and it opens, this page contains a search box in its body. My question is how can I add this search ...
0
votes
2answers
346 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
2answers
919 views

Deleted page still shows and is showing posts archive

I have a weird issue. I deleted a page and permanently deleted in from the trash but I can still get to it. On the deleted page it shows the posts page ("Blog" page). I have cleared the permalinks, ...
3
votes
1answer
706 views

How do I approach removing menu items on the fly based on settings in my plugin?

I've started writing a plugin that allows the administrator to select specific pages and set them to be visible only to logged-in users; the plugin optionally applies the restriction to all child ...
1
vote
2answers
5k views

Updated Wordpress, now getting errors on site

I just recently updated my Wordpress, theme, and plugins, and am now getting these two errors on top of the homepage and pages page. Deprecated: wp_make_content_images_responsive is deprecated since ...
1
vote
1answer
6k views

Get page content and execute shortcodes on a page

I would like to get show multiple page's content on one page with shortcodes. If I use return $html; the shortcodes not working, if I use return do_shortcode($html); the shortcode working, but the ...
1
vote
0answers
31 views

Why is my page feed returning empty content?

I am trying to debug why my page feed with is returning empty. Here's the URL for same, http://localhost/design-patterns/code-improvement/feed/ I'm seeing the following output here, <?xml version=...
0
votes
1answer
7k views

How to insert current user ID in a shortcode?

I have a shortcode from a plug-in called Pods that is used like [pods-form name="user" id="" fields="my_field, my_field_2, my_field_3"] Parameter name contains the name of the custom post type (...
0
votes
2answers
2k views

Show custom menu in category and its posts

I have a category X of posts. The category page and it's individual posts are all part of a custom menu consisting of pages and posts. My submenu, in the sidebar, works fine for showing on the pages, ...
0
votes
1answer
929 views

Parent for a single (single.php)

Is it posible to get the parent ID of an single page.... I mean not a Page I mean an is_single()... page. I have a page witch contains some custom posts and when I click on one of these i came to the ...
6
votes
2answers
15k views

How do I convert a page's title to lower case?

On my test case, the page' title is "Privacy". The straightforward approach strtolower(the_title()) also returns "Privacy" -- still with a capital P. I also tried mb_strtolower(the_title()) and ...
9
votes
7answers
28k views

Check if is on child-page of a particular page

I am trying to output a logo depending on which page is being viewed. <?php if ( is_page('home') || is_page('services') ) { ?> <div class="col-md-2 col-sm-4"> <?php ...
0
votes
0answers
24 views

How can I show ACF repeater first row and column post object only as a dropdown list upon select

I have created a repeater field using ACF and inside two post-object field where post type only pages and (parent page) First one multiple select None (sub page) Second one multiple select yes I ...
0
votes
2answers
648 views

how to change the permalink to a specific location?

I have this slider on my front page. Right now when I click on an image it goes directly to the permalink and the post. How do I make all the slides go to one specific page? this is the loop for the ...
1
vote
2answers
3k views

How to “group” (categorize) the Pages together?

I have a lot of Pages which can be (need to be) grouped under a number of different Categories. ** Then the more important thing is, i need to control those pages (of different groups) programatically ...
0
votes
0answers
31 views

register_rest_field only for specific page

I am using register_rest_field to send an additional field to the page endpoint but it is sending it to every page. I only want it on a specific page but don't know how to pass the page id to the ...
0
votes
2answers
2k views

loading a php file to a specific page id

I'm trying to assign a php file to a specfic page? I have modals stored in different files and want have them load in when their assigned page is called. These pages are using the same theme, "...
1
vote
1answer
10 views

Dash after page title

In the "Pages" section of the WordPress admin panel, after some of the page titles, I see these long dashes and a note(s) of some kind: "Privacy Policy Page", "Front Page, ...
8
votes
3answers
10k views

Disable Attachment Pages Completely

I would like to disable all attachment pages completely. I Googled it, but there's just information on how to redirect to parent post or homepage. That's not what I would call an elegant solution. Why ...
4
votes
1answer
343 views

Some pages are missing from the Parent Page select in the Editor

Two of my top-level Pages, and all of their children, are missing from the dropdown menu in the Block Editor for selecting a Parent Page. There are no special characters in the titles or permalinks. ...
0
votes
0answers
13 views

Not Found The requested URL was not found on this server. wordpress issue while editing or creating a new page

I'm having an issue: My website was working just fine and then suddenly something happened. I'm no longer able to edit the pages nor the post or everything I had. Even if I did the edit it did shows ...
1
vote
2answers
821 views

How to retrieve attachments from child pages of a specific Page?

How would I retrieve attachments from all subpages of a specific Page ID? Example: SPECIFIC PAGE Child (with attachments) Child (with attachments) Child (with attachments) I'm currently ...
0
votes
2answers
1k 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
1answer
1k views

Pagination url for page template

I am creating a page template in WordPress to show all my posts. But i have a problem with pagination. I have a page url like below: http://localhost/sdd/video "video" is my page slug. And the ...
1
vote
2answers
4k views

Woocommerce featured image of page - not product

I have a custom theme in which I have a woocommerce.php file to display the shop homepage. This is simply: get_header(); ?> <div id="primary" class="content-area"> <main id="main" ...
19
votes
5answers
61k views

Get the Current Page Number

In a situation where one has 20 posts per page. I would like to get the current page number in order to make some nice page links at the bottom. How do you get the current page. I tried this <?...
0
votes
0answers
16 views

How to “replicate” the customiser widget editor?

I have a rather unusual set up where pages are assigned unique widget areas. What I would like to do is have a widget editor in the page editor sidebar like the one on the customizer. Where in the ...
0
votes
2answers
2k views

Automatically search and replace link in content (pages/posts)?

The users of my site mainly share documents by inserting links into content (pages/posts) using the built in editor. These files include everything from pdfs to word documents. The users currently get/...
0
votes
1answer
10 views

Disable ADD PDF media button on rich text editor

I'm looking for a way to completely disable "add pdf" media button on text editor but not with css tricks. Is it a hook to add on function.php for doing this? Also a need to keep add media ...
0
votes
0answers
17 views

Update Pages ONLY from Stage to Live (not products)

I have a WordPress site that has a bunch of posts, a bunch of pages and a bunch of products (Woocommerce ones). I Staged the site and made loads of changes to the pages on stage, meanwhile the live ...
0
votes
1answer
879 views

WP won't save changes in post (any)

My WordPress does not save any changes in any post. I can create a new page or post and that one will be saved as 'Draft' but there is no content inside. When I make changes, press UPDATE it shows no ...
0
votes
0answers
20 views

How to upload a csv file in wordpress website, processing with a python script and download at wordpress website?

My question includes 3 parts 1)upload a csv file in wordpress website How can I upload a csv file into Wordpress? 2)processing with a python script Run Python Script on WordPress Website 3)download at ...
0
votes
0answers
20 views

Make page route accessible in subfolder URL

Is it possible in WordPress to have a custom subfolder URL for a specific page without creating a parent page? For example: I want to create a page called pizza and make it accesible from https://...
0
votes
0answers
9 views

Completely hide page from wordpress dashboard

I develop a plugin which create its pages: login, form, admin area. Creating pages done, these pages are available under Pages and Appearance/Menus. I would like to hide for example admin page ...
0
votes
1answer
1k views

Page with the same name of a category

I've a category, let's say "testcat". I want to create some pages which the final url should be "http://example.com/testcat/pagename". To do this, I should create a page named "testcat" and then a ...
0
votes
1answer
1k views

Add the same content to multiple pages

I have a website with over 500 pages. Dont ask why but none of these pages have any content in them. I have created a page layout to be added as a single wp bakery block and want to add this same ...
0
votes
1answer
21 views

create pages automatically and dynamically in wordPress

Is there an easy way to create pages automatically and dynamically in wordPress? Let me explain further: I am developing a website where I have more than 20 equal pages, with the same layout, where ...
2
votes
1answer
18 views

What type of page should i use? static page or category page? and what's the difference? [closed]

I’m a new WordPress user and i’m very confused about my how the structure of my website should be. I’m creating a language learning website and i started with the static pages (Home, about, etc.) Then ...
1
vote
3answers
12k views

Dashboard--> All Pages “How to create folders?”

I have going on three pages in All Pages on my Dashboard. Is there a way I can set up folders for these pages - - it's becoming a confusing "mess" to find which page I need to update when - for ...
0
votes
2answers
233 views

Should I use “Categories ” or “Pages” for a WordPress Static Site (A non blog site)?

I want to use WordPress for a Company Site which is not a blog; that will have regular pages, such as "About Us", "our Products", "Our Services", etc. What is the best way to use WordPress for this ...
0
votes
0answers
14 views

Auto Suggest/ Autocomplete to Select Option Dropdown

I made a Select Input field where users choose the page they want to go, press GO and get to that page. But as I have 20 Pages, a dropdown is not enough. So I would like add a Autosuggest function to ...

1
2 3 4 5
49