Questions tagged [custom-wordpress-pages]

This tag is for questions relating to how to create and/or modify custom page templates in WordPress.

This tag is for questions relating to howto create custom page templates in WordPress.

Related Tags

2009 questions
183
votes
19 answers

How can I get the current page name in WordPress?

What PHP code can be used to retrieve the current page name in a WordPress theme? All the solutions I have seen so far: the_title() get_page()->post_name get_post() etc. But these don't work for a page that contains post entries. They will all…
Bernard
  • 16,149
  • 12
  • 63
  • 66
40
votes
14 answers

How do I add static pages to WordPress?

How do I add my own static HTML pages to WordPress? For example, let's say I have a page, products.html, how would I add it to WordPress (any menu, etc.) and once added, how do I visit them, because WordPress had a typical URL structure?
Sarfraz
  • 377,238
  • 77
  • 533
  • 578
31
votes
5 answers

How to fix the error `found no layout file for "HTML" for "page"` in Hugo CMS?

I recently imported content from my WordPress page into Hugo. When I run hugo serve I get following error messages: WARN 2020/02/17 20:51:06 found no layout file for "HTML" for "page": You should create a template file which matches Hugo Layouts…
user6909438
18
votes
1 answer

Visual Composer custom shortcode template - custom_markup display user input

I have created some shortcode elements. Now I want to customize the look of the elements in the backend editor. From the description of the wiki of VC-Pagebuilder, I get out that I can use the "custom_markup" param for this. For simple html it works…
12
votes
6 answers

How to create a custom page in Wordpress?

How can I to create a custom page in Wordpress 3.0. Give me any link of tutorial.
Kartik Patel
  • 155
  • 1
  • 1
  • 4
11
votes
2 answers

Wordpress 5.6.1 - Permissions-Policy Header implementation

1° I need to implement the permissions-policy header in the .htacces file 2° I spent a whole day looking for the header on the internet, but yet, i found only explanations that i did not understand a 100% how to implement that. 3° The better…
10
votes
5 answers

Wordpress cron wp_schedule_single_event – action not always working

I'm registering an event like: wp_schedule_single_event( time(), 'do_custom_hook', array( $body ) ); Above that, I have added the following action: add_action('do_custom_hook', 'process_custom_hook', 10); function process_custom_hook($body){ …
OhMad
  • 6,871
  • 20
  • 56
  • 85
8
votes
1 answer

Setting a custom place holder image in twig/timber theme

So I am having a twig/timber issue where I have a difficult time getting a placeimage set, here is what I have so far: {% set defaultimg = site.theme.link ~ '/images/placeimage.png' %} and then later in my code I have:
ShrockCo
  • 357
  • 1
  • 13
7
votes
4 answers

Wordpress how to prevent duplicate post by checking if post title exist before running "wp_insert_post"?

I have a wordpress site that connects to a soap server. The problem is every time I run the script the wp_insert_post is using the same result again. I would like to check if existing post_title matches the value from $title then if they match,…
Jay Bryan Cañas
  • 225
  • 2
  • 4
  • 10
7
votes
2 answers

Custom breadcrumbs with list of children (categories or pages)

I am currently building my very first WordPress template (using Bootstrap 4) and I need to integrate breadcrumbs to my page. I can see that the theme we're currently using offers breadcrumbs as well, but as these are default breadcrumbs, it's by far…
JonSnow
  • 573
  • 14
  • 48
7
votes
3 answers

How to change Wordpress' default posts permalinks programmatically?

In the backend of Wordpress I use the default http://localhost/sitename/example-post/ value for creating permalinks. For custom post types I defined a custom slug this way, here is services for example: register_post_type( 'service', array( …
Floris
  • 2,727
  • 2
  • 27
  • 47
7
votes
2 answers

Is it possible to host wordpress database from other server

I've a problem is that I've to host wordpress database from other server and directory from another server where my domain links, so is it possible to connect wordpress directory from other database which is not on same server, kindly resolve my…
6
votes
2 answers

Wordpress permlink show "You should update your web.config now." in godaddy

In Godaddy wordpress site not showing inner pages, It show only home page and wordpress admin page. While click save changes in "Permalink Settings" it show "You should update your web.config now." While I add web.config in my site it show 500…
sabithkumar
  • 362
  • 4
  • 16
6
votes
2 answers

How can I paginate WP_Query results when there's an offset?

EDIT: This is the current code that I'm trying to paginate. It creates a custom query that excludes the latest post, as well as all posts from one category. Pagination works fine for the most part, but the problem is that the final link in the…
Brian O'Neill
  • 4,705
  • 5
  • 22
  • 26
1
2 3
99 100