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

learn more… | top users | synonyms (1)

0
votes
0answers
6 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
14 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
12 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
16 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
15 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
21 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
0answers
7 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 ...
-1
votes
0answers
14 views

How Do I make site-description stay in the same position when making it to a smaller size? [on hold]

http://abraham-accountants.co.uk/ This is the website #logo .site-description { float: left; font-size: 2.5em; font-weight: bold; color: #004488; font-family: 'Bitter', Georgia, Arial, ...
0
votes
1answer
12 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
30 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
6 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
18 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
0answers
11 views

How to Update GravityForms User Registration / User Meta in Edit Profile?

I am using the GravityForms User Registration, with a custom User Meta, umnum = mobile number. The theme I'm using has an edit-profile.php page. I placed the following HTML code into the file and ...
0
votes
2answers
16 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
29 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 ...
-1
votes
0answers
7 views

Woocommerce Refunds Functions?

I created a separate orderslist page for our employees so that they dont have to use the Orders tab in wp-admin as we have a lot of custom functionality. I am now trying to allow my employees to ...
0
votes
0answers
19 views

Whats your oponion? Laravel's new “Lumen” for WordPress plugin development? [on hold]

Would it make any sense to use Lumen for WordPress plugin development? I'm curious. The new lightweight "Lumen" framework, made by Laravel creator Taylor Otwell.
0
votes
0answers
22 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 ...
1
vote
1answer
13 views

How to Internationalize Wordpress - Extract strings with textdomains, per textdomain individually

I spent several hours searching, and have not found a solution, how to extract Strings dedicated by Textdomain from a PHP File (in a wordpress plugin): In my plugin and theme I use for example ...
0
votes
0answers
7 views

how to clear cache of checkout details for guest in woocommerce after certain time of inactiveness

In wooocommerce a guest shopping items (before loggin) and after that that person goes to checkout page. Now I've create checkout form in such a way that after selecting country from the dropdown it ...
0
votes
0answers
10 views

how to change shipping cost after changing the currency from “WooCommerce Currency Switcher” plugin

I'm developing a woocommerce wordpress shopping cart website, where I use "WooCommerce Currency Switcher" plugin for currency conversion. There are three currencies.. pound, dollar and euro in the ...
0
votes
0answers
10 views

validate phone on wordpress (woocommerce)

I'm trying to validate the next code of woocommerce to only accept 10 digits not more and not less. I already found a regex but not sure why I still can put more than 10 digits yet ...
0
votes
0answers
6 views

My customizer's setting doesn't set to the default and needed to click the control's “Default” button before it'll be set

Here's my sample customizer's setting and control: $wp_customize->add_setting( 'themename_img', array( 'type' => 'theme_mod', 'default' => ...
0
votes
0answers
8 views

Using Isotope in WordPress portfolio

I'm trying to create a custom post type portfolio and use Isotope for filtering according to categories but I'm not doing something right. I've loaded scripts in my header.php, created a custom post ...
0
votes
1answer
17 views

How to use TCPDF library in wordpress

I would like to use the library TCPDF to create pdf. Specifically, I want to create a pdf after clicking a button available in every custom post type called Property. This PDF has to have Property ...
0
votes
4answers
46 views

how to hide or disable some part in specify page

i want from my footer.php file some part like <div class="form">----------</div> this part will be visible all page but not show in home page and few other other. i think it is possible ...
0
votes
1answer
22 views

how could I load a different template part by page

I would like to use get_template_part(); to load a different template parts on different pages. so on the home page it loads get_template_part( 'content', 'home' ); and on the blog page it would load ...
0
votes
0answers
8 views

Auto Add Category to RSS Feed Posts

I pull in a RSS feed that creates posts using the Push Syndication plugin. Those posts come in without a category. I need them to come in with a category automatically. Is this possible using some ...
1
vote
0answers
21 views

How to Create a Subscribeable News Feed?

I am working on a subscribeable feed for my WP site, but I have little knowledge in PHP/storing items in a database. Here is what I need it to do: -You register for an account and you are taken to ...
0
votes
0answers
28 views

Add options to Wordpress backend

I hardcoded a page to use for a Wordpress-Site I'm managing but then my boss decided that said page needs to be editable from the backend for our customers. Long story short: How do I add editablity ...
2
votes
2answers
49 views

What is the most efficient way to search users by their display name?

Initially I thought I'd use get_users() but it turned out it doesn't support the display_name field. Then I've read about using WP_User_Query, but when I do it always exhausts the allowed memory size ...
0
votes
0answers
17 views

Filtering with woocommerce data attributes

I'm working on woocommerce based booking system. I want to filter product by availability. Now I have custom data attributes for dates. It's submitting in wp_postmeta table. My date returning array ...
0
votes
2answers
29 views

If else statement based on referral URL

I am trying to display content in a custom template based on referral URL. I put a link in my footer called http://domain.com/?ref=special and image2.gif shows still when I click it and go to the ...
-1
votes
0answers
31 views

PHP Warning: Invalid argument supplied for foreach() [closed]

I am trying to set up a theme locally but am getting the error "Warning: Invalid argument supplied for foreach()..". The custom field images/data that are supposed to be showing up are not & it's ...
0
votes
0answers
6 views

Save the outputted image into the Media Library, with a different filename and extension

For example, I have this "/image.php" file in my "/theme-directory": header ('Content-Type: image/png'); $im = @imagecreatetruecolor(120, 20) or die('Cannot Initialize new GD image stream'); ...
0
votes
0answers
17 views

How to get values from Gravity Forms fields? [closed]

I'm using gravity forms to allow users of my site to submit posts from the front-end. I have a URL field, where they enter a URL to an external webpage into the form along with a title field. In my ...
1
vote
1answer
56 views

How to store the_title() into a variable to reutrn the value, not just echo it

I have a loop, and need to pass one more argument through it. I need to get the current page's single post title, and then use that as the value. I tried going about it like this: $tagz = ...
0
votes
0answers
23 views

Create a simple mu-plugin that appends “?mobile” to all links

I have a wordpress website that is set to switch themes when "?mobile" is present in the url. I'm using it for a specific mobile design that will launch from a particular link. So, instead of ...
0
votes
1answer
11 views

Changing layout with wp_customise

So I'm trying to build a conditional statement to display different layouts depending on the option selected. Having a bit of trouble. $wp_customize->add_setting('layout', array( 'default' ...
0
votes
0answers
31 views

Querying latitude and longitude into google maps correctly

Im have custom fields for lat/lon and querying them into google maps. The query im using works if I know the exact number of lat/lon. $args = array( 'post_type' => 'events', ...
1
vote
0answers
19 views

How to update post meta on uploaded image from a custom form?

I have a custom PHP submission form wherein if I submit the form the entry will be created as a custom post. I am able to update post meta boxes for textareas and input fields but can't get uploaded ...
1
vote
1answer
17 views

do_shortcode with custom field

Ok I suck at PHP, so I'll explain this in "English" first then proceed to code. I've got a custom field in my WP DB called ecpt_imdb - this is the numeric value of a movie from the imdB. For example: ...
0
votes
0answers
13 views

Run insert if no entry otherwise run update with ajax

Below function works with ajax ... but I am getting a null result ... I want that if there is no data in the database then insert operation is performed and when there is data the update should work. ...
0
votes
1answer
15 views

Wordpress installed using WAMP.The requested URL /project/wp-admin/wp-login.php was not found on this server [closed]

I did a mistake handling config file in php now when I corrected I was able to install wordpress. Now login page is not opening. Please help me. I am new at Web Development and getting error. The ...
0
votes
1answer
40 views

Scrape external webpage for first image and add it to new post

I'm looking for a way to scrape an external page for its first/best/largest image and insert a copy of that image as the featured image of a new post on my Wordpress site. The way that I was hoping ...
0
votes
0answers
20 views

Serializing URL via wp add_shortcode to auto select from option list onload

first time in the wordpress stackexchange community! Great that there is such a thing... Scope: Use of the add_shortcode method to use url string to automatically select options in a scraped table on ...
0
votes
1answer
17 views

Why my query does not run with prepare

Hi Below is my query and it works with prepare keyword on the localhost but whenever I use prepare keyword with my queries on live server the data does not show up and as soon I remove prepare from ...
0
votes
1answer
32 views

blank page when trying to change upload directory

Working with wordpress 4.2.2, when I use this code in child theme function.php to change the attachments upload directory according to each post type : function wpse_16722_type_upload_dir( $args ) { ...
0
votes
1answer
46 views

Callback URL in WordPress

I want to use this service OnWebChange to monitor when a website changes and change mine accordingly. It would notify me via a URL callback to my website URL with a HTTP POST method. What ...
0
votes
0answers
13 views

Wordpress Formidable Pro frm_after_create_entry [closed]

I am working on code that copies entries from one Formidable Pro from to another. I know basically nothing about code so I am asking for someone to help me with fixing this below code. ...