We’re rewarding the question askers & reputations are being recalculated! Read more.

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
4answers
39 views

Add a Different CSS Class Into The Body Tag of Different WP Pages

I'm transferring a 20 page static HTML site to a custom Wordpress Theme. On each page of the static site the body tag has a custom CSS class i.e. 'banking-page'. I know that WP generates page id ...
0
votes
1answer
12 views

Display page content in different sections - based on page break block?

Is there a way to loop through page content, and display the content that is above page break in one section, and everything that is below the page break in another? Or additionally, a way to generate ...
4
votes
2answers
155 views

How to check if feed URL was requested?

I'm writing a plugin to block some pages to anonymous users on my site. I already blocked some pages but I can't get to identify the feed page my-wordpress-site.com/feed. I've tried: $GLOBALS['...
0
votes
1answer
22 views

Do not show child pages within a file page

I have a CPT created, in my CPT file page the father pages and daughter pages are shown. Books of science Book 1 Book 2 Books of science fiction Book 1 Book 2 In my case I don't want it to ...
0
votes
0answers
16 views

Custom theme index layout not displayed correctly

I'm making a custom theme that I'm planning to sell. I'm reading some guides about themes creation, I have already experience with wordpress but this time I want to make a nice theme. I'm facing a ...
0
votes
1answer
25 views

Disable Sidebar on certain pages

Good day! How do you disable/remove sidebars in certain pages? Do I need to install a plugin(what plugin)? Or should I do a custom code? Thanks.
0
votes
0answers
11 views

Automatically schedule post to go off/on at regular intervals

I will like to schedule my page to only display from 8am-6pm of the first 20 days of each new month, how is this possible please?
0
votes
0answers
32 views

Failed to load resource: the server responded with a status of 500 () post.php

I got no error in my Admin panel but when I define a new editor or author role when the user goes the panel to edit or add new page nothing works, no button, no page builder and nothing and He got ...
-1
votes
1answer
41 views

Forbid certain users to access a specific page

I want to build a blog where every user is allowed to post something (only text) after a successful registration. However, a user should only access other contributions from users who have uploaded at ...
0
votes
0answers
11 views

Backend overview pages in different sections

Is it possible to edit the WordPress admin overview of pages: /wp-admin/edit.php?post_type=page into sections based on post meta values? So for example I got 3 pages with the meta value of "Planten" ...
0
votes
1answer
24 views

Child and Parent Pages list of sub pages

I have a parent page called services with children, each service child has child pages within it. On the first level child page i want to show all of the pages below it in. When i click through to ...
0
votes
0answers
12 views

Homemade global template, advice?

For the theme I’m using there is a hook for an area just above the footer section and here I would like to output different ”banner sections” that are ”prepared globally”. So for each ”banner section”...
0
votes
2answers
51 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 ...
1
vote
4answers
39 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
2answers
325 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
57 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
1answer
159 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
150 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
239 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 ...
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 ...
1
vote
1answer
186 views

Way to querry data (tags) from a wordpress database?

I need to query the WordPress database and display the data on one of my pages. I've looked and search for tutorials online but none of them are really complete. I am trying to display a list of all ...
0
votes
1answer
51 views

How to tell if a page has subpages for Custom Post Types

I would like to show a page depending on whether it has a subpage or not. That is, if you have subpages, do not display the subpages, only the parent page to which it belongs. Something like this: ...
0
votes
2answers
341 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, "...
0
votes
2answers
83 views

Getting page / post URL on publish and / or update

I am trying to use a simple publish_post / publish_page hook to get the URL of the post/page when it is either published or updated so I can later turn it into a static page. Is it possible to add ...
0
votes
1answer
104 views

Custom Template 404 for specific custom post type

Some solution to create a custom template for (page 404) for specific custom post type.
-1
votes
1answer
31 views

How to return a Boolean for a page that is a subpage thru its name?

I am attempting to check for a page that is a subpage using its name. For example https://www.myexample.com/mypage/subpage_anything_1/andso_on Here www.myexample.com is the web domain, mypage is the ...
0
votes
1answer
174 views

get_the_title() gets printed out twice

I made a script which checks if the currently viewed page has a parent page and if it does, it prints both the parent title and child title. But if there is no parent page I still get a title of the ...
0
votes
0answers
26 views

Use page-templates without creating theme

I have created 7 pages that are used for CPT and other information. I want to know if there is a way to call the page templates without creating them. I just want a more tidy interface for the user, ...
1
vote
0answers
34 views

My page.php shows the index.php

Sorry for this simple question, I am very new to Wordpress. I have a simple index.php that show a view of posts, just the images. When I click on any post, it should send me to the full view of ...
1
vote
1answer
168 views

Global variable $post returning incorrect object

In my header.php file, I've been trying to retrieve the slug of the current page, to check it's WooCommerce Products Archive/shop page. I followed this similar question's answer, to no avail; instead ...
0
votes
0answers
293 views

Get current_post in reverse order with pagination

I'm trying to index my posts (in reverse) and I'm using current_count within loop to do this. This is my code: <?php $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $args ...
1
vote
1answer
94 views

How can I load a PHP page without using a Template?

I've been building out a website within a WordPress 'wrapper', and it's been going reasonably well. I've got a Plugin that holds some of my code, and I've got a Theme that holds other bits of my code,...
-1
votes
1answer
1k views

Retrieve Json data and create multiple pages with it

I am trying to load json data from this url and i want to create a page for every single hero available in the json file.how should i retrieve this json file and distribute the content in multiple ...
1
vote
1answer
633 views

Can't load WP function into external function

I created a bookshop website and got header function, footer function and login menu on my front page. All functions are declared in functions.php and connected to hooks. My front page runs ...
0
votes
1answer
441 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
68 views

How to add page numbering with php?

I made a custom php page for a category, and want to restrict the max limit of posts per page to 5, and have next and prev buttons. Can someone help? <?php /** * Video Template */ get_header(); ?...
0
votes
1answer
825 views

Display child page content of a specific parent on home page

This has been bugging the hell out of me, it should be so simple! I have a list of child pages under the parent called 'Our Homes'. The sitemap structure is as follows: Home Our Homes home 1 home ...
3
votes
1answer
9k views

Multiple is_page() in page.php

I'm trying to add multiple page IDs into an if else statement. This is my code so far: if ( is_page(ID) || is_page(ID) ) { get_header('header_alt'); } else { get_header(); } I tried a ...
3
votes
2answers
37 views

Is it possible to generate a page without create in the admin?

I need some pages for tracking purposes. I have some forms and depending of what city and course the user chooses, it redirects to the corresponding page (the url need to be like domain.com/course-...
0
votes
1answer
19 views

Show About and Contact Us page when they're clicked in the top menu.

I have a page.php file wich simply looks like this: <?php get_header(); ?> <div class="clear"></div> <div class="clear"></div> <?php get_footer(); ?> On the ...
-2
votes
1answer
29 views

Create an if statement based on page_id

I'm creating custom content and I want to show different content based on my page ID. For example, in home page I don't want to show anything but in another page I want to fill that space with some ...
2
votes
3answers
102 views

Print number of post (in reverse)

I'm trying to input the numer of the post next to it, but in the reverse order, which means not 1 2 3 4 but 4 3 2 1 . I have succeeded into doing it in the "right" order with this : <?php ...
0
votes
1answer
13 views

How to set the mainpage of a custom post type?

I just created a new custom post type to contain all the individual posts of the event im hosting. I want the slug for each post to be: myurl.co/conference/programitem I already got a page with the ...
0
votes
2answers
386 views

Noindex subscriber author page

I added the possibility to register on my site (with the role of subscriber), however each registration creates an author page for the user, but I do not want these pages to be indexed, only the pages ...
0
votes
0answers
210 views

How to remove a css class for any wordpress page

I need to remove a class for a wordpress page without using javascript, can it be done with php? or any wordpress function?. the thing is the following: I'm using a plugin and this plugin uses a class ...
1
vote
1answer
68 views

Populate editor with some content of a page with a page template

I have a page template like "page-salespage.php". what i'm trying to do is show default content in tinymice editor when this page template applies to a page. here's how i tried to achieve this, but i ...
0
votes
3answers
649 views

Use .php file as page instead of wordpress page & template file?

Im trying to find a tutorial for this but i can't seem to find one, and im just newbie in wordpress. Is it possible to use certain php file as page on a wordpress site instead of the regular ...
0
votes
3answers
8k views

How to link to a custom .php page in my folder

I have created a custom page that I have called mypage.php. It is in my template folder with al the other pages (index.php, page.php, ...) I want this page to be opened when i click on the below ...
3
votes
1answer
2k views

How to change “Shipping Calculator ”field label on Cart Page - woocommerce? [closed]

I actually have two questions. 1) how do I change the label "shipping calculator" to say something else on my cart page? 2) How do I make the item text show up under shipping contents. Right now it ...
0
votes
2answers
159 views

How to associate dynamic PHP page for chosen Wordpress tag?

I create some dynamic pages in Wordpress through PHP. Lots of them. Those are not visible in Wordpress backend, as all the data is taken from different database. Each of them use signle PHP template, ...