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

learn more… | top users | synonyms (1)

0
votes
0answers
34 views

How to stop printing header, footer, sidebar and other items (Tesseract theme)?

My screen pages look fine. All elements on a page look like they will print on one page. When the page prints, the header, menu (drop down), footer, social media icons at bottom (also showing link ...
0
votes
0answers
30 views

Adding a query string to product links

I need to add a query string to the end of the links generated by a [products] shortcode from WooCommerce. Each product appears with three links. The image, the title and the add-to-cart button. I ...
0
votes
1answer
27 views

How to order users alphabetically by name? in plugin UPME

I have this code: <?php class UPME_List_Cards { public $upme_options; public function __construct() { global $upme; add_shortcode('upme_latest_members_list', ...
0
votes
1answer
18 views

Wp_mail doesnt work

I created a form for mail sending, but it does not work. Email function is enabled in php. if (!$error_msg) { $to = "mail@to.send"; $headers[] = 'Content-Type: text/html; charset=UTF-8'; ...
0
votes
1answer
16 views

get_page_templates only return templates with “home” in the filename

I have the following custom page template filenames: template-about-1.php template-about-2.php template-home-1.php template-home-2.php I have this function to get_page_templates: function ...
0
votes
0answers
20 views

Allow one use group to manage another

I have a website where members and their managers have accounts. The members can create and upload their content, but the managers have their own login and can see a list of the members they manage. ...
0
votes
0answers
49 views

Blank screen on wp-admin

I know this question has been asked tons of times but it was all outdated; I tried every single thing and it still doesn't work. Here is what I tried so far: Renaming the folder Renaming plugins ...
3
votes
1answer
111 views

Retrieve POST data from AJAX call

I have the following JS script : jQuery('#form-recherche').submit(ajaxSubmit); function ajaxSubmit(){ var newFormRecherche = jQuery(this).serialize(); jQuery.ajax({ ...
0
votes
1answer
22 views

How can I use a text and a function php

I want to display a text and a function in same sentence: <?php echo 'Right sidebar'; ?> <?php echo the_content(); ?> Something like this: <?php echo 'Right sidebar' the_content(); ...
0
votes
0answers
20 views

Custom database query with accents returning no results

I have an issue where using accents in my custom database query (wpdb) returns no results. $wpdb->get_results( "SELECT * FROM table WHERE city = 'Montréal'" ); Returns nothing, while ...
0
votes
0answers
36 views

Make shortcode work in all posts displayed by loop, not just the first one

I have a post archive displaying post and author meta at roadtripsharing.com/road_trip I added a do_shortcode(); in the loop, specifically related to the "New Message" button which opens a dialogue ...
0
votes
0answers
22 views

function to write the output of a variable + post_title in post_content

I have a function that writes the output of a function of a rand_keys + the post_title in post_content, but writing the title but only happens after I click manually on the update button on the ...
0
votes
1answer
16 views

Create page in templates for pages or the pages manager?

In terms of slowness and loading which differences noted in the pages created as a template and created by adminisrtador? Example template page: <?php /** Template Name: My Page name */ ...
0
votes
0answers
46 views

Adding read more function through wordpress

First of all. I know wordpress has a read more function but that won't work either. Probably the same issue that's stopping me in the following. So i'm trying to create a read more function on my ...
1
vote
1answer
30 views

Wordpress Hook that will run when media file deleted

I am very new in wordpress and I am currently developing a wordpress plugin, I just want to know if there is a wordpress plugin hook that will run when one or more file of wordpress media is deleted. ...
-1
votes
0answers
33 views

How to display a local folder directory in an iframe for intranet site?

I am trying to get a local file directory (M:/) on a company server to display on an intranet site we are trying to put together. I am not a programmer / developer; however I have built a few dozen ...
0
votes
0answers
17 views

Passing Numbers & Letters in Query Strings

I have been fumbling around with this for 45 minutes now, and can't seem to get anything working 100% as I need it to. I am developing a plugin to allow multiple query strings (1 for "level" and 1 ...
0
votes
0answers
24 views

Display most popular posts

I have already found a way to display recent posts: <?php $args = array( 'post_status' => 'publish', 'numberposts' => '60', ...
0
votes
2answers
35 views

Get Custom URL For Custom Taxonomy

I've got a custom post type called productpopups, and to sort them I have a custom taxonomy called productcategory. The post type has it's own special template (single-productpopup.php) and I'm trying ...
0
votes
1answer
9 views

Recent posts with featured image or fallback image with permalink

In my sidebar.php I have some code that prints the recent comments. I could not share the complete code here because of the formating restrictions. You can find the code here: ...
0
votes
1answer
102 views

Integrating PHP into Javascript to display map markers with Google API

I am getting one map marker to display but not multiple markers. However the data displays in the HTML log. I think I am missing a loop or did not use my current loop correctly. Anyone who could ...
-1
votes
1answer
33 views

Using a filter in functions.php to add content to single posts regardless if post is in main or child category

Im using following filter (codex) to add some html content with a lower priority (20) to the bottom of my single posts wich are in a specified category: add_filter( 'the_content', ...
1
vote
2answers
95 views

Featured image fallback link to permalink

I use this to display the featured image for each post. If the post does not have a featured image, a generic image will be displayed: <?php if ( has_post_thumbnail() ) { echo '<a href="' . ...
-1
votes
0answers
18 views

Why is it saving multiple rows at once just after login?

I want to save user login time. When I logins it save multiple rows in the table user_logins. Here is the code from my plugin: function ai_save_user_login_test() { global $wpdb,$table_prefix, ...
1
vote
1answer
26 views

Page vs Custom Post Types Differences/Issues

I started noticing issues last week when 4.5 was released and mistakenly believed that update caused an issue. In reality, I just happened to notice it for the first time around then because last week ...
0
votes
1answer
30 views

Calling a save function from a “submit” button

I am trying to call a function to save changes from a submit button, but I am not accustomed to PHP programming, as I have just started. I tried Googling around a bit, but didn't find anything too ...
0
votes
0answers
47 views

wordpress custom numeric pagination next / previous / last not showing

I'm using a custom Numeric WordPress Pagination on a page template using a wp-query, based on this tutorial : tutorial I have the numeric pagination working fine, and the page counter also. but the ...
0
votes
2answers
34 views

Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?

This is my first go at making my own shortcode. What I am trying to do I have 11 different outputs for star ratings I want to be able to use in posts. I want to wrap it all into one shortcode, and ...
0
votes
0answers
17 views

Output Video Download Link in template

I have a website that uses a "video" custom post type to display self hosted videos in post. I am trying to figure out how to make a download link for each video that uses this "video" custom post ...
0
votes
1answer
35 views

Setting value of session with Ajax not working

I´m kind of new to using Ajax but I am trying to update the value of a session using Ajax. The Ajax call shoud fires when clicked on a button. When I click on this button it also returns the succes ...
0
votes
0answers
18 views

Adding extra rows to form, and saving values entered.

I am attempting to create a quote-form where the user can add as many items as necessary. I would then like to take the values entered and output them to a html table in an email. Here is the ...
3
votes
1answer
80 views

How to get the registered sidebar's name by its id?

Let's say I have this code in my "functions.php": function mytheme_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Sidebar Name', 'mytheme' ), 'id' ...
0
votes
0answers
11 views

Click to expand menu

I have the following menu in Wordpress: https://jsfiddle.net/L3y2rno8/ (renderd HTML) The menu is using a custom walker in my theme functions.php: function wp_nav_menu_attributes_filter($var) { ...
0
votes
0answers
13 views

Show page title in links sitewide using a value from a meta field for AB Testing

I am building an AB Testing plugin. I have built a repeatable set of meta fields where each set of fileds will represent a new AB Test Variation. The main content of a variation consists of a title ...
-1
votes
2answers
37 views

foreach all the post

How to i foreach the post title like below. this is what i want below function get_all_post_for_search() { return array ( array( 'name' => "Hello Project", 'thumb' => ...
1
vote
1answer
18 views

Executing `createimagefrompng()` from save_post hook (or equivalent hook)

I'm having trouble executing createimagefrompng() from a hook. I've used the fairly straightforward PHP way to add a watermark to an image. If I hardcode the image URLs in this function and for ...
0
votes
2answers
35 views

Is it save to use eval for a jQuery callback method coming from the database?

I'll be brief and hope I can explain my scenario correctly. Here's my scenario. The jQuery slider plugin has an anonymous callback method. I would like to give the Admin the ability to create a ...
0
votes
1answer
43 views

Warning: call_user_func() expects parameter 1 to be a valid callback, function

I keep getting this error when. I am trying to insert a dashboard widget and I don't know what's causing the error. Warning: call_user_func() expects parameter 1 to be a valid callback, function ...
0
votes
1answer
35 views

jQuery accordion menu

So I have just started developing a theme with _s (underscores) as a basis. For three days straight (almost) I have been trying to make an accordion menu sort of like this: Example: ...
1
vote
1answer
31 views

Undefined offset: 0

Here is my PHP function function getUserIDandPush($ul){ global $table_prefix; // Prefix for Database table global $user_login; global $wpdb; // Wordpress WPDB database method $dt = ...
0
votes
1answer
35 views

echo esc_url( get_permalink($post->ID) + complete the ID's url

I am in a deep trouble I try to only display the content of a post after clicking a bouton in order to not have the header and the footer again. Manually I have downloaded the plugin "Show Content ...
0
votes
0answers
29 views

Display category name only once inside loop

I have been researching on how I can output the category name on a wordpress loop for custom post only to display only once. If there are any posts under the same category, the category name will not ...
3
votes
2answers
33 views

wp_insert_user role not working

I have be trying this all day but it is not working how do I set a role for the current user I am inserting with the wp_insert_user() function $userdata = array( 'user_login' => $username, ...
0
votes
0answers
14 views

List all post from different post type on one page by CPT UI

I am a php begginer. I am using CPT UI plugin for one of my projects - free resources for designers. The idea is to have different pages for different type of resources. So I will create different ...
0
votes
3answers
33 views

Division by zero error in image.php

Checking my error log on the server I continually see the error: PHP Warning: Division by zero in /public_html/wp-content/themes/sass-wordpress-bootstrap-master/image.php on line 95 Here is the ...
0
votes
2answers
48 views

Show custom taxonomy not in submenu

I have one small problem and I can't find answer...I have created custom post type and custom taxonomy, but my custom taxonomy is showing as sub menu under custom pos type, here is example what I ...
0
votes
1answer
16 views

Wordpress PHP syntax doesn't seem to be working correctly

When I run this wordpress query, instead of the background image showing I just get the end of the div string echoed out? The image string appears in the browser inspector, but not to the screen. Here ...
0
votes
2answers
41 views

Relative post date in recent posts list

I have basically worked on this all night and I realize I am quite stuck. I have a sidebar in my wordpress theme that displays the most recent posts. The sidebar looks like this: Below each title ...
-2
votes
1answer
22 views

wordpress theme breaks in inserting an external php ? possible mistake in folder config?

I am new to wordpress and following is my scenario. I am inserting an external php script in wordpress by creating a new template in the theme and then using that template in a new page. When I do ...
-2
votes
1answer
44 views

True or False: Is an Apache error or PHP error the same as a WordPress error?

I am using CentOS 6; Apache 2.2.2; MySQL 5.6; PHP 5.5.31; WordPress 3.8.13 . I do not have root access to this server because it is shared. I do have FTP and SSH (with some limits to functionality). ...