All Questions
138 questions
17
votes
3
answers
21k
views
Pass PHP variable to javascript
Is there any possibility to pass some PHP variables in javascript so I can use them later?
Only in single.php.
I heard about wp_enqueue_scripts but with that it is neccesary to declare a path to a JS ...
9
votes
8
answers
17k
views
Is there a way (plugin?) to restrict a user to being able to edit just one page?
We use wordpress like a CMS and would very much like to allow users to have a "homepage". Ideally they'd be prevented from mucking up the whole site.
Is there a simple way to limit users editing ...
6
votes
2
answers
16k
views
Creating a WordPress admin page without a menu for a plugin
I am writing a plugin, that will list a number of entries from a custom set of tables. I added the main page for the plugin using the following WordPress functions:
// Add menu and pages to ...
5
votes
4
answers
2k
views
What is the best page ordering plugin that works well with WPML? [closed]
The title says it all.
What is the best page ordering plugin that works well with WPML? It seems that may are reporting issues with different plugins such as my page order and WPML page order.
...
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
1k
views
Best way to manage a lot of pages in Wp Admin [closed]
There is already a thread for this from 6 years ago here How can we make managing lots of pages in WordPress Admin better? but I can't believe I can't find something useful today. Most of these ...
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
1k
views
jQuery plugin only in one page/post
I've seen all the documentation in the codex, but I am doing something wrong since it doesn't work!
I want to implement this jQuery plugin (https://github.com/davidcrawford/typist-jquery) in my ...
3
votes
2
answers
854
views
How can I show drafts in wp_dropdown_pages list?
I am using wp_dropdown_pages in the backend of my site to generate a list of pages according to a specific set of criteria.
The list only shows published posts where I would like it to show both ...
2
votes
4
answers
1k
views
Pages with 2 Columns
I've had a look at many of the available plugins but they all seem to be too difficult to use or do not provide enough flexibility.
Plugins I've already tried:
WP Post Columns
Magazine Columns
WP ...
2
votes
3
answers
3k
views
Show a special message for private page?
If I set a page to private, can I have it show a message instead of a 404 page for public users?
2
votes
1
answer
182
views
How to exclude a widget from page 1 of a paginated post
I want certain widgets to not appear on page 1 of a paginated post, but appear on all other pages (page 2, 3 .. so on), and some other widgets to appear on only appear on page 1 and not the rest of ...
2
votes
2
answers
2k
views
add_meta_box Callback not being called
I created my first plugin last week that makes a custom post type. As this worked, I copy pasted the code I already had and modified it to be a different post type. For whatever reason however, the ...
2
votes
2
answers
10k
views
Is there a way to lock certain pages from being edited by anyone other then the admin?
I have built a WordPress site and theme and have several pages that I do not want editors to edit. However, there are other pages that I want them to have access to to edit. Is there a plugin or code ...
2
votes
1
answer
3k
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 ...
2
votes
1
answer
5k
views
Create a custom page template inside my wordpress plugin
I'm developing a Wordpress plugin and I want to create a file to where I want to redirect the user to show some information.
I know that a perfect solution for this is using Wordpress custom pages. I'...
2
votes
1
answer
7k
views
How to show category images (from plugin) on a regular page (page-example.php)?
I am trying to use the Category Images Plugin to show images with my Custom Taxonomy (Region) categories/terms. Here is the code I have so far in a page-example.php that lists all the categories/terms ...
2
votes
1
answer
1k
views
[Plugin: Posts 2 Posts] How does it work?
I recently discovered Scribu's Posts 2 Posts plugin, which seems to be exactly what I was looking for in order to connect pages and posts for a big editorial website.
But I cannot get it to work, ...
2
votes
1
answer
2k
views
Creating a menu page in a Object Oriented developed plugin
I am trying for the first time to build a plugin for Wordpress following OOP way.
I am having some problems while trying to create a submenu page using add_users_page() function.
Here is a simple ...
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
309
views
Custom Text Under Navigation Links
My navigation bar of my wordpress theme is set up to wp_list_pages. I'd like to display text underneath those page links.
Like:
Home
"Home Sweet Home"
Do I need a widget to accomplish this or is ...
2
votes
1
answer
859
views
Set a category for a page
My current theme has a portfolio section where you can have an array items based on what category they are in. My problem is that I have several pages that I want to be in the portfolio section but ...
2
votes
1
answer
88
views
Automatically adding post and pages to new blog setups
I'm using the ThreeWP Broadcast plugin to add and control post and pages from the main blog to all my sub-blogs in the network. Is there anyway i can automatically add all of my post and pages from my ...
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
2
answers
1k
views
How can plugins have their own pages?
My plugin needs to introduce a number of interfaces to Wordpress for the public traffic. What is the best way of introducing new interfaces?
1
vote
1
answer
718
views
wordpress reusable content blocks
I am using a custom post type to allow the editor of the site to add a number of blocks of content to the site - infoboxes.
Now i would like to give the editor the possibility to choose which boxes ...
1
vote
1
answer
253
views
Add a plugin before main container
If I have a plugin that prints (simply) "Hello World", and I want it be outside of the main container, so, like this:
<h1>Hello world!</h1>
<div id="content">
.
.
.
</...
1
vote
1
answer
28
views
Wondering what these multi-colored extra pages are?
I've recently taken over managing the Wordpress site for my non-profit. The person who set it up before me has a lot of plug-ins installed and widgets set up. Additionally, there are these 5 multi-...
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
1
answer
577
views
Do action only on certain front end pages?
I am creating a plugin that allows users to insert certain code on their specified page or post of their choice. I have tried doing this:
function asdf() {
$siteURL = get_site_url() . '/';
$...
1
vote
2
answers
2k
views
WP-PageNavi plugin doesn't work with multiple pages of search results
I'm using Dilectio theme and WP-PageNavi plugin. The plugin creates links to multiple pages perfectly on every page except for the search results page.
For example, when I search for the keyword "...
1
vote
1
answer
60
views
The sidebar in wp-admin dashboard disappears when viewed on mobile screens in WordPress
I have created a user role called "Customers" through the "Ultimate Member" plugin which has access to only the "Pages", and "Profile" sections in the wp-admin ...
1
vote
0
answers
261
views
Elementor Combined all Sections into 1 Text Editor
I am hoping someone might be able to help me with this.
I used Elementor to edit my front page, which was great because it was nicely organized with sections and content and everything.
Now I just ...
1
vote
0
answers
708
views
Wordpress web pages keep getting deleted (moved into the trash) by themselves
I'm new to Wordpress. My Wordpress web pages keep getting deleted (moved into the trash) by themselves, without any input from me. Luckily I have made a backup with All in one migration tool, prior to ...
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
0
answers
28
views
(FES EDD) New vendor submission page is blank
When someone signups as a vendor and tries to post a new submission(service), when its posted the page is blank: https://markety.gg/downloads/demo-from-dilip
In the backend, the submission is ...
1
vote
0
answers
58
views
Wordpress plugin/theme or other wayout to create portable pages?
Here is my problem - I have my production server running my wordpress site. I have mirrored the site on my localhost to play around and make updates before I push them to production. Staging process ...
1
vote
1
answer
175
views
php page not found for plugin options menu
I'm trying to make an options page for a plugin and i'm getting The requested URL /site/wp-admin/plugin-email.php was not found on this server. every time i press 'Save settings'.
Here is my code:
...
1
vote
1
answer
161
views
Changing page URL and connect newsletter to MailChip
I have a page on WordPress (example: abc.wpengine.com/abc) and I want to change it to abc.wpengine.com/xyz.
I tried to fix the page inside Pages and Posts, but it was not there. I also went into my ...
1
vote
0
answers
655
views
Wordpress page and plugin list using sql query
I want to get all published pages and activated plugins of my word press site,i want all pages and plugin using mysql query.i don't want to copy paste all pages from wp admin.i want to get this list ...
1
vote
0
answers
41
views
Create page from plugin, but have it completely hidden
I need to have a plugin create a page that is publicly accessible, but does NOT show up in the admin section anywhere, and cannot be deleted or modified.
I thought maybe figuring out a way to have a ...
1
vote
1
answer
164
views
How to add subcategories to the blogroll?
I'm looking for a way to create subcategories in my blogroll...
For example:
Downloads
-> Windows
-> Mac
-> Linux
I want to create a real page (not a widget) where the main categories and ...
1
vote
2
answers
741
views
How do I write an inventory list plugin that creates dynamic details pages?
I am working on a plugin that creates an inventory list page using an XML data file. For the sake of this example, let us say the inventory items are antique motorcycles or contemporary area rugs.
...
1
vote
1
answer
251
views
Can I allow certain people to add/edit pages within a parent?
I'm planning on building a site with different sections, for example:
Training
Conferences
Ideas
A different person will be in charge of editing and managing each section. They will be able to edit ...
1
vote
1
answer
289
views
How to delete page by deactivating plugin
register_activation_hook( __FILE__, 'myplugin_activate' );
function myplugin_activate() {
//create a variable to specify the details of page
$post = array(
'post_content' ...
0
votes
2
answers
8k
views
Proper way to replace the_content only for pages created by custom plugin
I'm creating a plugin that needs to replace the_content of only two specific pages that it created upon activation.
Here is my code:
add_filter('the_content', 'emd_content');
function ...
0
votes
2
answers
6k
views
Add menu page issues (permissions & position)
OK, I have an issue with Sidebar Generator Plugin.
This plugin creates subpage called "Sidebars" in WP-Admin. The point is, it is created as a child of "Appearance" page.
And I don't want it here, I ...
0
votes
2
answers
7k
views
Display Custom Field Value on Admin Page Column
What I want is to display the value of the custom field called 'page_template'. I use the code below but it displays nothing under Page Template column although I have already defined a value for the ...
0
votes
1
answer
34
views
Would Gutenberg be considered a PlugIn?
I believe Gutenberg is the default editor in WordPress. Would it still be considered as a plugin if it is installed in WordPress by default and no option to remove it? I assume plugins are able to be ...
0
votes
3
answers
169
views
I need help locating a URL that is on my site map, but that I can't find in my Wordpress dashboard
I hired a developer to implement the LearnDash plugin on my Wordpress site. He wasn't able to finish the project and left my site with several unnecessary pages and plugins. I want to get my site back ...