The server-side programming language that the WordPress core, plugins and themes are written in.

learn more… | top users | synonyms (1)

1
vote
3answers
61 views

How to use wp_localize_script in a WordPress page other than functions.php?

I have a contact form in a WordPress page like this: $( '#contact_form' ).bootstrapValidator({ fields: { // ... }, submitHandler: function( formInstance ) { $.post( "../...
0
votes
0answers
21 views

WordPress Link - Custom Project

hope doing fine. I have a project and um really stuck in. Concept: http://abd.press/fU4yH Here is a little code, which i was successful to get from different sources but unable to manage next. <...
4
votes
2answers
73 views

Easy way to process search results before displaying

I've got several search forms on my site and I want them to show different results. My website has a very strict hierarchy and the search form on a parent site should only show results from it's child ...
0
votes
1answer
29 views

Plugin Development sqlite or WordPress' database

I am developing a plugin for WordPress that has to store between 4.5-200mb of data. I thought of using sqlite to store and access the data instead of using WP's database. From a performance ...
0
votes
1answer
25 views

Update post meta - Custom field does not match meta-key

I am trying to update my acf with update-post-meta: //ga_analytics_settings update_post_meta($my_post, 'ganalytics_settings', serialize($ganalytics_settings)); $ganalytics_settings is an array, ...
0
votes
1answer
41 views

Updating meta_value in a custom key

I have a custom meta_key called 'sales' this holds information of all sales a sales person has carried out along with a flag to say if it has been authorised, awaiting authorisation or if it has been ...
-4
votes
1answer
23 views

Add a “Next Post” & “Previous Post” styled button manually to a post

Can anyone walk me through the exact steps? I want to create two buttons that sit next to each other at the bottom of a post for the NEXT and PREVIOUS posts...I want to be able to insert this ...
-5
votes
0answers
24 views

Change Woocommerce total cart rates [on hold]

I have two categories names Regular Notebook Personal Notebook I want user to give 2 options in cart page before checkout. Canada England First Option: I want if user select only Regular ...
0
votes
0answers
26 views

How to escape ampersand in redirect URL?

I have hooked the 'login_url' function, so that the user can login via different means. Here is what the code looks like: add_filter( 'login_url', 'my_login_page', 10, 3 ); function my_login_page( $...
0
votes
0answers
15 views

Multiple file upload frontend and capture their paths

<input name="image_url" type="file" /> <input name="Submit" type="Value" value="Přidat" /> I have this in html form and this in php : if ( $_FILES['image_url']['name'] != "" ) { ...
1
vote
3answers
45 views

How to check if comments are paginated?

I'm trying to determine if there's more than one page of comments in single.php. In archive.php I can do something like this to check if there's more than one page of posts: if ( $wp_query->...
1
vote
1answer
34 views

Display a message if posts dosen't exist on loop

I have a loop for bookmarked/favorite posts and for a fresh account if you don't have a bookmark post on bookmark page will show this message: Bummer, no bookmarks posts! After the fresh account ...
0
votes
0answers
14 views

Pagination not working for custom post loop [duplicate]

I have a loop for my custom post, and it displays the pagination links fine, however when i click to the next page it displays the same posts again (event though the URL shows its on page 2). Below ...
0
votes
0answers
10 views

Select metakey values from WP database only where posts are published (two tables)

I am trying to select metakey values from wordpress database like this: global $wpdb; $r = $wpdb->get_col( $wpdb->prepare( " SELECT meta_value FROM {$wpdb->postmeta} WHERE ...
0
votes
0answers
34 views

Redirecting Wordpress user to a different url based on entered Username

Is there a way to redirect certain wordpress users to a different website url when they enter their username? Here is the URL. 1) New customers would login to the Wordpress website as they would do ...
0
votes
2answers
30 views

301 redirect from webpage to wordpress page in the same root

I installed WordPress in my root directory http://coinauctionshelp.com. I want to redirect pages in the root to the new wordpress pages using an .htaccess file like this 301 redirect http://...
2
votes
2answers
34 views

Sorting list of sites from multisite network using wp_get_sites

I have a loop that pulls in all sites in my multisite site network and loops through them to get variables located in their ACF options. Here is an excerpt from the code I am using: $stageurl = ...
0
votes
1answer
13 views

Update if post with specific title exists

I am trying to create a post, if it does not exist and update the post by its title if it exists. The title is unique, because its the users username. However, the update functionality does not work. ...
-3
votes
1answer
24 views

How can I fix my pagination?

I'm trying to get pagination working on my custom wp_query post loop. I currently have it set up, but when I click on page 2, it shows the exact same posts from page 1. I have a total of about 8 posts ...
0
votes
2answers
34 views

Make a permalink to the most recent blog post

I want to make a permalink to my most recent blog post. I would use this link as a navbar link. The reason I'm not putting code straight into the navbar is because I am using a widget which will not ...
0
votes
2answers
59 views

Add valid XHTML closing img tags to Wordpress galleries?

Default wordpress galleries img tags close with invalid XHTML and the lazyload XT plugin that I'm using targets valid XHTML img tags which means ending should be: <img src="http://www....
7
votes
2answers
287 views

Remove update nags for non-admins

I'm trying to remove or hide the update nags for non-admin users. As an admin, I see: The popular answer I've seen to handle this says to use: function hide_update_nag() { if ( !...
0
votes
3answers
50 views

Stumped on migration

I'm migrating a site from my server to a client's Bluehost (ugh) account. I've tried using All In One WP Migrate BackupBuddy manual migration (copying files & exporting a db using WP Migrate DB) ...
-4
votes
1answer
38 views

how to Show BEFORE TEXT before in wordpress get_comment_meta [closed]

I am using a piece of code to show the city output. It is working fine. The code is given here: $city = get_comment_meta( get_comment_ID(), 'city', true ); I want to show Re: text before the output ...
1
vote
2answers
53 views

Returning a value from a PHP page

I have created a WordPress page that has this simple PHP code: <?php $result = array( 'State' => 'Done', 'ID' => 1 ); wp_send_json( $result ); ?> When ...
0
votes
0answers
27 views

Install and activate WordPress plugins from different web app

Is there a PHP API or endpoint that will allow me to install and/or activate plugins of other WordPress sites, using their URL and authentication info. I wish to build a PHP web app that will have ...
0
votes
2answers
31 views

Add key and value to an array in another file

In my site I'm using the Product Archive Customizer plugin for WooCommerce. Great plugin. However, there is an option to set the qty of products shown per page. The next piece of code is responsible ...
3
votes
0answers
43 views

How to find objects by terms

I am struggling with a search filtering. Firstly, my script is searching for users using natural search SQL. The query returns ids of users. Now I would like to filter them by terms which are assigned ...
3
votes
1answer
165 views

Should the value of core functions be escaped before outputting?

Should the value of functions such as the_permalink() be escaped before outputting to the browser? For example, do I need to escape the following? <a href="<?php the_permalink(); ?>">Link ...
-3
votes
1answer
68 views

Advanced Custom Fields Show PHP in Text Areas

I recently installed and configured my ACF fields. However, I found out that when I include PHP (ex. <?php the_field('field_name');?>) in a custom field on the admin panel, the PHP only shows up ...
0
votes
1answer
42 views

Where to find the html for Wordpress site? [closed]

Where can I find the HTML for a Wordpress site? I'm using the "X" child theme. I found a tutorial explaining how to achieve an effect that I want and it says that "All I need is an HTML markup and to ...
0
votes
1answer
30 views

How can I Use 2 databases with one WordPress install

What I'd like to do is have the regular WordPress application run from its regular database, and then have a separate database for a game server which will hold all game data. What I need is to make ...
3
votes
1answer
82 views

How to preserve PHP modifications while upgrading WordPress?

I made a lot of custom modifications in the PHP code of my WordPress blog. Namely in: archive.php, blog.php, footer.php, functions.php, header.php, search.php To provide customized search results, ...
-1
votes
1answer
33 views

How to string lines from the_content() hook in WordPress?

Inside my content-video.php template, I have the following codes: <iframe src="<?php echo get_the_content(); ?>" width="960" height="540" frameborder="0" allowfullscreen="allowfullscreen">...
0
votes
2answers
55 views

What is the difference in the WP memory limits?

I have seen this question PHP Memory Limit vs. WP Memory Limit and it has a really poor answer and the question isn't that good either. I am on a dedicated server and can do whatever I want. I want ...
-1
votes
0answers
20 views

Plugin “Remove Slug From Custom Post Type” gives 404 Errors

This plugin did all I wanted, but it started giving me 404 errors, which go away after a while but I'm worried they'll come back. I do get this error while posting a new listing (real estate theme) ...
0
votes
0answers
17 views

Ajax interfering with widget back end Javascript

I have a plugin that creates a widget that allows users to click a button and select an image. I have noticed that immediately after the widget is dragged and placed into a widget area, two Ajax ...
0
votes
0answers
22 views

Pass the data from Custom Form in wordpress

How can I get the value from custom form in WordPress and stored into teh database? Here is my form. I used the bootstrap validator for this form. Now, what do I have to do to get data from this form? ...
0
votes
1answer
50 views

Combine CSS and JS files from plugins

I want to combine all my CSS and JS files. Given the fact that I use different plugins I don't see a way to do this manually because after an update of the plugin I have to start all over. So I did ...
0
votes
1answer
64 views

After upgrade to php 7 plugin/them updates broke [closed]

I upgraded my Ubuntu server to php 7 and setup ssh2. Afterwards, my WordPress plugins/themes will not update. I am receiving the Unable to locate WordPress Content directory (wp-content). This ...
0
votes
1answer
26 views

Child theme functions.php file change database entries

I'm sure my title is not the correct terminology. I will do my best to explain what I'm trying to accomplish. Years ago I spent countless hours customizing a theme. I was finally forced to update ...
0
votes
0answers
23 views

AJAX call to Vimeo API from WP admin

What I am trying to do is query the Vimeo API to populate some ACF fields in a custom post type. I'm loading this in the admin head for WP Editor, which grabs the Vimeo URL from the ACF field, and ...
0
votes
1answer
44 views

Basic PHP question (displaying post title over thumbnail) [closed]

I'm new to PHP so excuse the vagueness of this question. I am using a plugin called WP-Tiles that takes a group of posts and displays them in a grid. I'm calling this grid with the following function: ...
0
votes
1answer
30 views

WP_Query Custom Post Type if Category ID Equals

I've setup a custom post type "slides" and I've created two categories for the slides custom post type: "slides-testimonial" (id = 7) and "slides-regular" (id=8). I would like to run a single loop, ...
0
votes
1answer
29 views

Only Get A Certain Number of Posts From WP_Query

I'm not sure what I'm doing wrong. None of my WP_Queries are returning the given number of posts. From what I can tell, it's returning all of them. How do I fix this? Here is the code I'm currently ...
0
votes
0answers
36 views

Custom Meta Box Image Gallery Not Saving

I'm having an issue of a custom meta box I'm building based off of WooCommerce's Product Gallery meta box. The meta box is not saving for some reason. I've tried some options from many different ...
0
votes
1answer
28 views

customizer live preview layout picker

I'm trying to create a layout picker option using the wordpress customizer. What i've done so far works except for the live preview. when i change an option in the customizer for example left sidebar ...
0
votes
1answer
22 views

Custom Post-Type not in admin menu

As I'm working on a private and custom theme for my website, I created custom post-types for different kinds of data i want to display (and adding extra data with custom fields). Anyways, as I ...
0
votes
0answers
24 views

Wordpress Pings Backs From My Own Application

I'm building my own forum software and I would like it when a user creates a post with a link to a Wordpress site it will notify the site that I have linked to it. I've searched around Google and I ...
0
votes
1answer
24 views

Issues separating my Plugin pages into different files

As my last (first) plugin got a bit hard to manage with 6 admin pages in 1 file, I decided to split them up for this one, but I am getting nothing but issues doing so. In my plugins functions file (...