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

learn more… | top users | synonyms (1)

0
votes
3answers
18 views

Wordpress site cant display media when it's live

In localhost this code works fine to display images from my media gallery but when my site goes live $images are empty although there are images in the media gallery. Are there something I've missed ...
0
votes
0answers
9 views

WordPress Network - Bug - is this happening to everyone?

I just installed my WordPress Network. I also have the 'Multisite User Management' plugin network activated. This is my structure: domain.com (the first installation) sd1.domain.com sd2.domain.com ...
-4
votes
1answer
50 views

paginate_links() returns NULL instead of the pagination links, but pagination is actually happening

What I'm trying to do: Print the pagination links on the home, which uses template index.php, with pagination functions such as paginate_links(), outside The loop. What happens instead? Instead of ...
0
votes
1answer
41 views

Putting php inside an echo php shortcode

I am using wordpress. I am using the plugin social locker. I have figured out how to display the shortcode via PHP: <?php echo do_shortcode('[sociallocker id="3071"] My content Here ...
0
votes
1answer
56 views

Advanced Custom Fields | how to use conditional statements in repeatable group display

Hi there, I'm just getting started with ACF and writing php statements. Although I've been working with them for a little while I'm still building confidence. My aim To display a block of code if a ...
0
votes
2answers
39 views

You do not have sufficient permissions to access this page while making a plugin

You do not have sufficient permissions to access this page. This is the error i am facing while making my own plugin.Actually, i want to link to another page. Wordpress version is 3.8.1 I made a ...
0
votes
0answers
12 views

Content not retrieving on .load jQuery function [duplicate]

I`m trying to get posts from a wordpress query_posts external php file via .load jquery function. I`m getting the correct html code, but the wordpress loop part of the code is not loading. My code ...
0
votes
0answers
19 views

Best way to execute custom page-specific mysql queries

I would like to query a secondary mysql database (not the Wordpress mysql database) with page-specific queries. I've seen many answers / tutorials on setting up a secondary mysql database, like: ...
0
votes
0answers
13 views

Wordpress javascript images

After moving to wordpress the images of weather cannot be retrieved even though the javascript code runs fine.Here is the code that i am using to retrieve images in javascript: customIcons: ...
0
votes
2answers
53 views

Inserting data into `post meta` table?

How would I be able to insert data into the post meta table? I know how querying and wpdb works but I have no idea how I can just insert it into the table. I have these two fields I want to insert ID ...
0
votes
0answers
23 views

WooCommerce - group downloads by product [on hold]

In Woocommerce(*My Account page) I can see now an unordered list with all the downloads available, like: <ul class="digital-downloads"> <li><a href="#">Product 1 - ...
1
vote
1answer
31 views

Logout and redirect using the WP Menu

I have a navigation hyperlink in my secondary menu, that will allow the user to logout: However, the user is prompted with the following screen for confirmation, when clicking on the hyperlink in ...
1
vote
0answers
40 views

Wordpress Custom field Colors

I came across this code and would like to use it in my project. It works fine, but the problem is, I need to change those colors in the array to instead pick transparent images from url since I am ...
0
votes
1answer
17 views

How to enable Zend Optimiser+ with Batcache

I am using Batcache with APC Object Cache Backend so far. A lot of posts on internet claiming that using Zend Optimizer instead of APC would reduce CPU and memory usage. I could enable Zend ...
0
votes
2answers
82 views

Using php inside javascript [closed]

I have got the following code in a javascript(jquery) file called custom.js: var gapinvite = new Date(); gapinvite = new Date(2014, 06 - 1, 2); $('.days').countdown({ until: ...
0
votes
0answers
18 views

Separation of view and logic

I find that very easily my views become cluttered with logic, e.g. null checks, email validation, and retrieving values from the post object. How would you separate this out in Wordpress? Is there any ...
0
votes
0answers
10 views

including php file from payment gateway

I'm implementing a payment gateway called point, is a Swedish company. Everything is fine with this files, because I already tested outside of wordpress.<> But now that I'm implementing this on ...
1
vote
1answer
33 views

How to let users change site language?

I translated all my theme strings and saved in .po and .mo files. I tested the implementation and it works fine, however I'm not sure how to let users choose their own language. Are there any ...
-2
votes
1answer
68 views

Wordpress: code structure

EDIT: I've posted them separately here wordpress.stackexchange.com/questions/137672/… and here wordpress.stackexchange.com/questions/137673/…. I'll vote to delete this one. I'm working on a Wordpress ...
0
votes
1answer
28 views

Wordpress Background Audio - Continous AutoPlay

I'm kinda of a newbie , but know my way around a bit in Wordpress to code things in place. I would like to know if you happen to know how to create a continous audio play in the background of the ...
0
votes
1answer
111 views

Show contact 7 form in popup

I am creating map link on a image and it has two links to open video and contact form. I am making popup with lightbox but its not working. here is my code.. HTML <div class="map"> <img ...
0
votes
0answers
18 views

Email notifications: Where in database to save user options?

I'm working on an email notifications plugin which sends emails when events happen on my site. So for example, if someone comments on a post, the post author will receive a custom email notification. ...
0
votes
1answer
26 views

Use of IF statement in Header file

I have a custom page template created. When I load my page, it shows the header logo of the mainpage but what I want to achieve is for each custom template created, I want it to only show its own ...
0
votes
0answers
33 views

Hide Password Protected pages in Recent posts

I have the following lines of code in my functions.php file: // Filter to hide protected posts function exclude_protected($where) { global $wpdb; return $where .= " AND ...
0
votes
1answer
33 views

Top menu disapears in Category Pages when filtering using ACF

I am using ACF (Advanced Custom Fields) and filtering the results using the method they posted on their website. ...
1
vote
0answers
27 views

Search Query: how to construct a search string from two select elements?

Im trying to create a wordpress search widget. The final search string Im trying to submit is made up of two keywords, one each from a select element. I'd like the final search query to be ...
0
votes
1answer
195 views

How to add product in woocommerce with php code

I want to add products with PHP code like below: $post_information = array( 'post_title' => 'new item shop', 'post_content' => 'this is new item shop', 'post_type' => 'post', ...
0
votes
0answers
23 views

shortcodes not working -they just display as raw shortcode (code)

I'm developing a plugin and need to implement shortcodes, the shortcodes is coming out as it is on a archive/category page - I have used to the shortcode_exists(); to check if the shortcode does exist ...
-1
votes
1answer
30 views

Display Post Titles on top of the_post_thumbnail()

I'm working on an issue that's just about solved, but I'm currently stuck. I've changed content php to change the way posts are displayed. I've ran $wp_query->current_post to determine what the post ...
0
votes
1answer
76 views

add_action into another add_action not working

I have this little php code for wordpress. It doesn't work. I want to make one add_action under another add_action. But the add_action that is under, is not working! function no_reminder() { ...
0
votes
0answers
41 views

Load CSS files in header of Bones theme?

I'm using the Bones theme, and I'm trying to turn jQuery plugins into WordPress plugins. In the init.php file for the 'Chosen' plugin I'm converting, I've included this code: function chosen(){ ...
0
votes
1answer
26 views

Wordpress Setting page can not be saved by html radio

I have this php Code to make a option page that activate a function if the user set "active" and turn off the function, if the user set "Not active". <?php add_action('admin_menu', 'custom'); ...
1
vote
1answer
49 views

Using TinyMCE in plugin?

I've successfully integrated DataTables Editor into WordPress as its own plugin. It loads successfully and I can edit a DataTables' table. What I'm trying to figure out is how to utilize WordPress' ...
0
votes
1answer
35 views

Calling the Next category link on an archive page - Wordpress

I've been working on creating a link in my header, should say "see enter next category name here" I've been using this code, found here (I would comment again to ask directly on that question, but ...
0
votes
1answer
43 views

Correct code to use php in text widget

This code is used to display php inside a text widget add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ...
0
votes
1answer
40 views

Add login hyperlink to secondary navigation menu

I have the following lines of code in my functions.php file: #-----------------------------------------------------------------# # Custom menu ...
0
votes
1answer
107 views

'Bones' theme: Load stock scripts in footer instead of header?

I'm using the 'Bones' theme in my latest WordPress site, and when I run the site through Google PageSpeed, I receive the following error: Eliminate render-blocking JavaScript and CSS in ...
0
votes
0answers
26 views

How to paginate categories and sub categories?

Here is my code so far: <?php if (isset($wp_query) && $wp_query->max_num_pages > 1) : ?> <div class="row"> <div class="col-md-12"> ...
0
votes
1answer
32 views

php loading different structure than source code

I was trying to code in a conditional statement into a template file and had a bit of an issue. This is the code in the file else { echo('<div ...
0
votes
0answers
26 views

Adding ID to a Listing but not inside WP_Query while

<?php $args = array( 'post_type' => 'bedrijf', 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ); ...
0
votes
1answer
27 views

Foreach loop returning more than one item when querying taxonomy

I am querying the taxonomy terms and then listing the posts that are under those terms. The taxonomy is basically a category for a custom post type, and the terms in it are the categories. I didn't ...
0
votes
2answers
23 views

Where can I find linked fonts in my theme?

I get 404 error because of absent of fonts in my theme ( .ttf , .wof). In my opinion the only solution for this is to delete the request from my them, but I cant find the request string. I've looked ...
0
votes
2answers
69 views

Simple seo-friendly custom $_GET url rewrite with htaccess

I have this url: http://sitename.com/?game=runescape Is it possible to modify the htaccess file or rewrite the url via Wordpress to become like this: http://sitename.com/game/runescape
0
votes
1answer
46 views

Show all terms of a custom taxonomy?

I made a few custom taxonomies and I need to show ALL the terms from it, what I achieved so far is showing the taxonomies that are selected/chosen in a custom post type but I need all of them to show, ...
0
votes
1answer
44 views

wp add inline style in loop

I want to add inline styles thanks to the wp_add_inline_style wordpress function. The inline styles will be added in a loop. In my case, I output an isotope grid in my loop and this grid can have ...
0
votes
1answer
32 views

How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?

I have the following problem developing a WordPress theme and I am here to ask you if this solution could be a good solution or if exist some better way to do. I have a custom WP theme and into this ...
0
votes
2answers
35 views

Undefined variable: row?

I'm trying to select the post_title from wp_posts with a query which I did using this method: global $wpdb; $test = $wpdb->get_var( $wpdb->prepare(" SELECT post_title FROM ...
0
votes
1answer
37 views

PHP in Wordpress?

I'm stuck with a question. How far can I go with php with wordpress? If good it's of course not the same as using a server+db and a .php file to script everything you can imagine, but how far can I go ...
0
votes
0answers
21 views

Minify style.php in head of index.php

I currently have a WordPress theme options page. I read all the theme options styles in style.php which I then include in the head of my website. Does anyone know how to minify this style.php file? ...
0
votes
0answers
28 views

Help with tweaking code for showing custom text i products woocommerce [on hold]

I got help earlier from @Ravs who was very kind to help me with tweaking this code $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); // current term $parent_slug = ...