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

learn more… | top users | synonyms (1)

0
votes
1answer
37 views

Include files in functions.php

This is a rewritten post since the way I worded my old post totally confused everyone. MikeSchinkel shows how he uses Include files in his theme's functions.php file In this Stackexchange post: ...
0
votes
1answer
25 views

Post formating on Home page

I've simple question regarding WordPress post looping. I want to achieve something like this on my site: ~ I am running Real estate portal site and I want to display featured property on my home ...
0
votes
0answers
7 views

wordpress feed-make a custom feed URL using custom field

Can I Use www.example.com/?customfield1=value1&customfield2=value2&feed=rss2 to generate feed. Generated feed should be filtered by customfield1 and customfiel2's value.
0
votes
1answer
21 views

archive per year with monthly

I have an archive that shows all the post on monthly now i want is to group them per year like 2015 Jan Feb March 2014 April May I'm using this code. <?php wp_get_archives( array( 'type' ...
-1
votes
1answer
28 views

get_option return incorrect values

I'm making a Wordpress Plugin, and I'm starting with the Admin Settings page, I have the page setup and in the menu bar, i have also added sections and fields in to the page and they all work fine, ...
2
votes
2answers
187 views

Conditional to modify query results

I'll admit, I'm not a PHP expert, nor am I familiar with all of the WordPress functions and hooks. I've been stuck on an issue, searching for help without much success, and I was hoping that someone ...
0
votes
1answer
40 views

Allow the execution of an external PHP script for logged users

I need to call a PHP script external to WP and I would like to take advantage of the credentials of WP so that only logged users can access this script. I have tried to use this code embedded in my ...
0
votes
2answers
43 views

How do I check if there is a tag in the title

I have many post with multiple tags ex: AMOS LEE, FOO FIGHTERS,TAYLOR SWIFT Post only have one of the tags in the title ex: “The Man Who Wants You” – Amos Lee How would I scan the_title() and go ...
0
votes
0answers
7 views

How to load individual widgets within sidebar(Not all at once)

I want to load my Wordpress site sidebar widgets when scroll down. So I want to know how to load individual widgets one by one. I tried plugins like 'Lazy Widget Loader'. But they didn't work for me. ...
0
votes
0answers
24 views

wp nav menu without label

I have a menu on wordpress using this <?php wp_nav_menu( array( 'sort_column' => 'menu_order','menu_class' => 'navlink', 'container' => false, 'theme_location' => 'header-menu') ); ...
0
votes
1answer
10 views

$wpdb returns duplicate posts

I have created a shortcode which shows the posts which were created after the user last logged in. The shortcode is working perfectly fine, but I am not sure why but I am getting 7 duplicate posts. So ...
0
votes
0answers
32 views

Category - “No content found”

so here is my problem: get_header(); if (have_posts()) : while (have_posts()) : the_post(); ?> <article class="post"> <h2><a href="<?php ...
0
votes
1answer
24 views

How to avoid duplicates when creating recent network posts

I'm using this code to get a list of custom posts (with custom fields) from the network for display in a php widget. It's old, but it's working fine: <?php switch_to_blog(4); ?> <?php $ca = ...
0
votes
0answers
13 views

Google-App-Engine[PHP]: Error trying to establish database connection

Hi to whom this may interest, I am finding a problem with the cloudsql as database connection is not being established. I have followed the following site step-by-step ...
0
votes
0answers
19 views

Using simple field variables within a loop

I am trying to loop a custom post type called "room" within a custom post type called "venues". I have venue pages and I have created a custom post type called room which is tagged with the venue ...
0
votes
1answer
21 views

Commas not displaying in implode

I'm trying to separate some taxonomy terms with a comma, but I can't see to get the commas to show correctly. Here's what I got: <?php $terms = get_the_terms($post->ID,'type'); foreach ( ...
1
vote
1answer
51 views

Excerpt unwanted text “<!— value: -->”

After I updated my WordPress to 4.2.2 I minified my code : <?php while( $teamGroup->have_posts()) : $teamGroup->the_post(); ?> if (get_the_excerpt()) { ?> <?php echo ...
0
votes
2answers
27 views

esc_url( ) won't use https

The code on the page looks like this: if ( ! empty( $image ) ) : ?> <div class="headshot"> <img src="<?php echo esc_url( $image ); ?>" alt="Photo of <?php echo esc_attr( ...
0
votes
0answers
19 views

Adding some sort of Label-text to a looped button

To sum up my problem, here's a picture: I've added this text with a hover-fx to a button to explain to users what the button does. I've done so by adding a <div> with another <a>-element ...
0
votes
0answers
6 views

Extra text in the sidebar for 1 menu item and his sub-menu items?

In the main menu i have 3 channels "About, Service, Contact". The page "About" has 3 sub-pages, my issue is in the sidebar in channel "About" i need a text which is only on this page visible and his ...
0
votes
0answers
20 views

How to fix pagination issue on wordpress

I have a category with 2 subcategories. i have created a custom category template, to show the posts from the subcategories of that category, so it look like that: category page shows: Subcategory ...
0
votes
0answers
25 views

How to find the function which is outputting Array

I'm calling a plugin (Event Rocket) from a template and the output is mostly as expected but seldom the only thing that is displayed is "Array". I have consulted the plugin's makers and they have no ...
0
votes
1answer
34 views

Get terms of the posts with one query

I need to get the terms for 2.000 posts. How can I do this without making 2000 queries? Is it possible to get terms of the post in the post_object with a filter or something similar? ...
0
votes
0answers
10 views

get_metadata() vs get_post_meta() vs custom query [duplicate]

I have 27 items of post_meta data that I need to get out in a class that I use through-out my website. Currently I'm using: $this->postMetaData = get_metadata("post", $postID); This returns an ...
0
votes
2answers
110 views

Show success or error messages in Ajax response to Wordpress custom registration form

I have this custom form inside a Wordpress page template <?php if(!is_user_logged_in()) { if(get_option('users_can_register')) { if($_POST){ $username = ...
0
votes
0answers
23 views

Using Conditional Themes to change out different themes using the Theme Customizer radio Buttons

I've been trying to change my theme based upon a radio button selection from the theme Customizer. I've included this plugin -> https://wordpress.org/support/plugin/wp-conditional-themes as a file ...
0
votes
1answer
81 views

Use SCSSPHP to compile Theme Customizer Values into .SCSS files ready to compile to CSS

I've been having trouble Automatically Compiling my .scss files into my main WordPress style.css file. I'm using Leafo's SCSSPHP script and trying to achieve a few things. i'm using Kirki ...
0
votes
1answer
21 views

Meta Box plugin image_advanced not showing up on frontend

I'm using the Meta Box plugin on a site and am having trouble with one of the meta boxes options. I've got it working fine in the backend, but when I use it in a page template all i get on the front ...
0
votes
2answers
35 views

divide custom field values in div every two values

i have this html mark-up to sort some data <div class="row"> <div class="col-xs-2"> <img src="images/member-schools/ms1.jpg" class="img-responsive"> </div> <div ...
0
votes
1answer
23 views

Get all categories post is not in

I am trying to get a list of all categories that the current post is not in. I made it this far... $categories = get_the_category( $post_id ); $nocats = get_terms('category', array('exclude' => ...
0
votes
1answer
44 views

WordPress get pagination on wpdb get_results

How do I gee the numbered pagination of custom wpdb result? below code will show one latest post from each authors in the site. I want to show 20 posts per page with a numbered pagination. $postids ...
0
votes
0answers
19 views

Perfmon performance counters on WAMP

I work on an WordPress site for a business. I'm using WAMP: Windows Server 2008 R2 Standard, sp 1, 64-bit. Apache version 2.4 MySql version 5.6.9 PHP version 5.4.13 8 GB RAM Intel Xeon CPU 2.93GHz (4 ...
0
votes
1answer
15 views

GravityForms Limit Submission Per Time Period by User or IP by 30 minutes?

I am following this DIY code by GravityWiz but the author doesn't mention how to make the code work with 30 minutes, 1 hour, 2 hours, etc...? He only explains how to make it work with 24 hours - ...
0
votes
0answers
61 views

How to add a Custom Mailchimp AJAX Newsletter Subscribe Form

I want to add a custom Mailchimp AJAX Newsletter Subscribe Form to my WP Blog. I found this tutorial and have followed it: http://neal.codes/blog/custom-mailchimp-ajax-newsletter-subscribe. I've got ...
0
votes
2answers
56 views

Show only one post for each author ( Page loads too slow )

I want to show only one latest post by each author and found this code that it working. However, it takes too long to load the page since I have over 100K authors and 100K posts in database. How can I ...
0
votes
0answers
18 views

Add custom functionality on WooCommerce complete button

I've a situation to add some data to the database tables on order status completed button. I can see the url in class-wc-admin-post-types.php Can someone help me for any hook? Or how the ...
0
votes
2answers
23 views

Plugin PHP write permissions

I wrote a plugin in which one of the PHP files itself opens and writes another small text file. How to grant this PHP file the right permissions?
0
votes
0answers
13 views

Changes in header.php not reflecting

I edited <meta name="author" content="my_new_value"> in header.php of the parent theme. But the same old value is displayed. I've tried switching themes but this didn't work. What could be ...
0
votes
0answers
34 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
28 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
15 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
16 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
31 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
24 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
39 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
7 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
66 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
94 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
49 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? ...