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

learn more… | top users | synonyms (1)

0
votes
0answers
47 views

Custom post excerpt not translating in WooCommerce product page

I am trying to show the translation of an excerpt of custom post that is associated with a WooCommerce product. The excerpt always shows in default language but using the same code used to work for me ...
0
votes
1answer
34 views

zip unzip attachments in wordpress

my client using easy digital download plugin for sell their photos. They upload a zip file that contain many photos and sell this zip file. My need is to extract this zip file and display the images ...
0
votes
0answers
19 views

ajax and php code

I try to send ajax data to my Wordpress site. The ajax code seems to work fine and it POSTS to a php file its data(this php file is located in my plugin folder). I send the ajax data when I navigate ...
0
votes
3answers
21 views

Make post title active

Hi I have a simple website that displays every post title in a list, I'm trying to change the active post title to be different when its being viewed. I have tried this but it's not working. <ul ...
0
votes
0answers
49 views

How to send Woocommerce new order notification to different email based on fixed values on billing address?

The scenario is that I have restaurant with 3 branches. I need to send email to specific branch email address based on the billing_address_2. On checkout the new order notification needs to go to the ...
0
votes
0answers
28 views

add_settings_field() inside loop

Hey I'm trying to add textareas dynamically - so there's no fixed amount of textareas which are added. I tried it with anonymous functions inside a loop, but I just can't get it to work. Here's my ...
0
votes
0answers
54 views

Dynamic form variables for post meta

I am trying to create a dynamic form in the wordpress admin where I can add a line and still be able to process the variables into the database as post meta. I've done quite a bit of research and ...
0
votes
1answer
13 views

Contact form field in wordpress menu

I am trying to insert a simple 1 field contact 7 form into my menu. I have this code working for just text, but if I try to insert the shortcode for the form, I get an error. What am I doing wrong? ...
3
votes
1answer
80 views

Query both first_name and last_name from wp_usermeta at the same time

I'm trying to fetch both the first_name and last_name of all users at the same time, using the wpdb-object and the wp_usermeta table. I can't seem to figure out how to get both in the same query. ...
0
votes
0answers
20 views

Weird slug in archives permalink

All my wordpress installs (and some others, as I see) have the archive based index in the following format http://example.com/date/2015/06/02. But most current installs out there display it as just ...
1
vote
0answers
156 views

I am getting allowed memory exhausted in wp-db.php

Today I checked my error_log and found these errors in it. PHP Fatal error: Allowed memory size of 176160768 bytes exhausted (tried to allocate 5290845 bytes) in ...
0
votes
3answers
78 views

Remove Customize Background and Header from Appearance admin menu without CSS or JS

I am trying to remove background and header from appearance menu, but they don't seem to go away! I think it's because I have activated customize, but can I remove them anyway without using CSS or JS? ...
1
vote
1answer
73 views

Creating bulk posts with Youtube videos

I'm a bit new to Wordpress and I'm a bit lost reading all sort of docs about creating bulk posts using PHP. I've wrote a small code that using Youtube API v3 to get all the videos from a Youtube ...
0
votes
2answers
151 views

Your PHP installation appears to be missing the MySQL extension which is required by WordPress

After I upload my website on server, I got that message .. I searched on Internet and I found on Wordpress community this link , I followed the installation steps, the error message gone, but I got ...
0
votes
0answers
37 views

Loading index.php contents which located outside blog folder for post single page

I'm creating blog page as WordPress for my static PHP website. When blog page URL changes to pretty permalink (example.com/blog/my-post-page), loading contents (not redirecting to index.php, only ...
0
votes
2answers
44 views

php if username is role

I know you can easily display custom content if a certain logged in user is a certain role using <?php if ( current_user_can('contributor') ) : ?> media files loop <?php endif; ?> ...
0
votes
1answer
65 views

allow user to select pages from dropdown in my plugin

I have a plugin and a part in it allows user to select the page plugin works on by specifying the id of the page. But I want that he should be able to select the page from the pages available in the ...
0
votes
1answer
24 views

Admin bar nodes

I write a plugin. Inside it I use php and javascript files. I also use admin bar and I managed to display it with its nodes under the root menu. I nedd the following functionality: Clicking on one ...
1
vote
1answer
12 views

Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value

I want to have this kind of validation in my code: if (/*OLD*/get_theme_mod($name) != /*NEW*/get_theme_mod($name)) { // do something.. } That code will execute after pressing the "Save & ...
0
votes
1answer
31 views

how to echo meta tag in header using php

I need to display a meta tag in header for singular custom post type "communications" like this: <meta name="citation_title" content="single post title is here" /> I tried to use this code : ...
0
votes
1answer
40 views

php return username of currently viewed author profile

I'm at a loss. I have profiles developed for my wordpress website, and I want to display content on my page-profile.php that is specific per user profile. I've looked all around the codex and only ...
0
votes
0answers
18 views

ACF get_field Strip content - strstr

I have I am using a Google Maps field and need just the address (not the name of the location or lat/long coords) My snippet of code looks like this: <?php ...
0
votes
1answer
52 views

Getting ACF relationship field information

I am trying to use ACF Relationships to associate members to different committees. On the front end, I want to have the committee name and the board members that are associated with them. I have ...
0
votes
1answer
51 views

What does this mean in wordpress? Easy question

Im digging wordpress and started to look into templates to be specific blank themes/frameworks for making custom themes. I found "HTML5Blank" and was going through source code and found something i do ...
-1
votes
2answers
67 views

Replacing a specific menu item

So, I understand how to target a specific menu using the following to add a custom code. <?php wp_nav_menu( array( 'menu' => 'Project Nav', // do not fall back to first non-empty menu ...
0
votes
2answers
57 views

Custom Post Type Plugin not loading category template and loading 404 instead

I have been looking around for the past few hours and I am starting to be kind of desperate... I have created a plugin to add my custom post type "project" (making a new portfolio)... In this ...
1
vote
1answer
57 views

Change list item content in menu navigation to add a child element with specific class

I have been away of wordpress for quite a while and never practiced that much. I have a few problems even tho I looked on the internet for an answer... regarding the wp_nav_menu behaviour. Hope you ...
0
votes
0answers
16 views

Mixing ads in with product listings in wooommerce

Thank you in advance for any help on this. I've been searching and I'm having trouble finding a solution. I'd like to add some jpg's in with my products that are listed on the category page. For ...
0
votes
0answers
26 views

Need help with meta_value sorting custom posts

Basically, every custom post (butik) has alternative buttons (butik, restaurang, cafe, service) in the edit mode. This code I'm using now worked when I had select buttons where only 1 category could ...
0
votes
2answers
39 views

same user role or copy the user role to be same as the other role

how do you make the user role "contributor" to be same as the user role "seller" by using functions.php I've tried user role editor, but it seems to be the dokan multivendor plugin has set only into ...
0
votes
0answers
21 views

Home page template changing on modification from random pages

I'm currently having a major problem using wordpress 3.8.1. Whenever I'm modifying a page, the template on the home page changes to whatever the template of the page I'm modifying is. Home page as its ...
0
votes
0answers
43 views

Adding custom field to permalink structure

I have a wordpress site that uses a custom post type 'external-projects'. Within that custom post type there is a custom field 'director'. What I am trying to do is rewrite the permalinks to include ...
0
votes
2answers
66 views

Adding PHP in the menu

So, I have following php code: <?php global $my_profile; ?> <?php if (is_user_logged_in()) : ?> <div class="img" data-key="profile"><?php echo get_avatar( ...
0
votes
0answers
16 views

the_content interrupts sidebar

I am using a shortcode in a sidebar which is getting the excerpt, and a plugin which is using the_content filter to edit the content. The problem is that what ever changes I make through the_content ...
0
votes
1answer
32 views

Trying to make a simple wordpress plugin, having difficulties understanding how to make it?

I am currently trying to develop a simple wordpress plugin for a client, but am having issues with how complicated wordpress makes its APIs and plugins. The code so far: ...
0
votes
1answer
64 views

I created a custom form in HTML/CSS and now I need it to submit … should I create custom PHP or is there a plugin I can use?

I'm new to WordPress development and any advice would be appreciated! I have been a front-end developer for a while and have always handed off forms I created to a back end guy or gal for them to ...
0
votes
0answers
33 views

Query post by category using only one custom page template

Is it possible to query a post by category using only one custom page template? Basically I created a custom post called "Vehicle" and each post are assigned to a different a category. Instead of ...
0
votes
1answer
72 views

Theme Options Page - User Updates Logo

I'm a newbie to WordPress Development so bear with me. Site: https://wordpress-portfolio-zacnespral21.c9.io/ On the site above I would like to add an option in the themes options page for the user ...
0
votes
0answers
32 views

Grab text from other website and copy into wordpress Contact form

I am making a wordpress website with a contact form. Of course, the information typed in by the user must be sended to the owner of the website. This is pretty simple by just putting in the right ...
0
votes
1answer
34 views

How passing values ​​to construct function with Actions?

Must use a do_action (); to pass values ​​to my class. How do I do that?? add_action( 'plugins_loaded', array( 'someClassy', 'init' )); class someClassy { public static function init() { ...
-1
votes
1answer
18 views

Php inside the shortcode is getting commented

<?php echo do_shortcode('[learn_more caption="ancila"] <p> <?php echo get_post_meta($postid,principal_1,true)"; wp_reset_query(); ?> </p> ...
0
votes
1answer
29 views

WordPress the_content Page Load

I am creating a Quiz for WordPress in which it replaced the WordPress post content with a Quiz if you have enabled it. There are a total of 5 questions per post and to proceed further you need to ...
0
votes
1answer
56 views

Buddypress - how to display user role on profile page?

Hi: n00b with Buddypress, and not very experienced w/PHP hacks either. I have a staging site where the user is prompted to choose a role (Musician or Venue) during registration. This goes well, but ...
0
votes
1answer
43 views

WP Admin Bar - Get current theme name as custom menu title

I wish to echo the current theme in text in my WP Admin Bar sub menu. How would I go about display a snippet of PHP inside the 'title' => 'php snippet here', ? ...
0
votes
0answers
38 views

Function is creating too many queries

I have code that displays a list of categories and orders them by the number of ACTIVE posts in the category. This is determined by comparing the custom field of due date against the current date. If ...
0
votes
0answers
41 views

wordpress list table, action, export phpexcell

so i've setup up a working list table to my table. i'm trying to add export as an option but i'm stuck at the start with phpexcel :( if('export' === $this->current_action()) { require_once ...
0
votes
2answers
34 views

Get Current user email as a return string value

if(strpos($query, '%get_email%') !== false){ $query = str_replace('%get_email%', get_the_author_meta( 'user_email' ), $query); } Okay so am trying to make a MySQL query and in the ...
0
votes
2answers
30 views

Wordpress 4 invalid username special charachters issue

I have some danish users that uses special chars like æøå and they can't log in to my wordpress blog. I tried on a fresh install on 4.2.2 and on 4.1.5 and it did not work, for example Andrew ...
-1
votes
1answer
40 views

probleme adding Txt and Links in preg_match()

I'm newbie in PHP, i use this PHP code who work as a charm (@Brian Fegter) : add_action('template_redirect', 'foobar_explode_if_no_citation'); function foobar_explode_if_no_citation(){ #Get the ...
0
votes
0answers
46 views

Loop only displaying one post

After a WordPress update the following code started only displaying one post on the page. I thought something was deprecated so I updated the parts I was sure about. But I'm still getting pretty much ...