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

learn more… | top users | synonyms (1)

0
votes
1answer
11 views

How to change this internal image link parameter using PHP?

How resize this string / change link parameter. Original file = mydomain.com/wp-content/uploads/2015/01/name-file.jpg Return to $string now = ...
1
vote
2answers
25 views

Help with some php math in Wordpress

I've made a woocommerce store and I am using a dropshipper - so every product has an price and a trade price for me - which I am importing and storing as a custom field 'trade_price' on the product. ...
0
votes
1answer
15 views

Custom user roles doesn't apply changes

I have created a custom user role but something strange happens. This is the role: add_role('custom-role', 'Custom Role', array( 'activate_plugins' => false, 'delete_others_pages' => true, ...
0
votes
0answers
20 views

Integrating external php api code into wordpress

I want to integrate an external API into WordPress. The API is of property listings, I have the PHP code for it, the output can be in JSON or XML, have code for both, but I don't know how to integrate ...
0
votes
0answers
11 views

Add submenu items programmatically in front-end menu

I have defined a front-end menu main-menu for my theme; this menu has been created in my back-end and filled up with some links. What I need to do is match a top-level menu item that is created in ...
1
vote
2answers
33 views

How to output wordpress custom tags separated by comma?

Based on a few references I've built a function to output a list of custom taxonomy terms separated by comma. The code works as intended, where food_tag is the custom taxonomy I registered for a ...
0
votes
0answers
5 views

Conditional Row Actions on WP List Table

In WP_List_Table() I have the following: function column_session_id($item) { $actions = array( 'confirm_paid' => sprintf('<a ...
-1
votes
1answer
23 views

Limting the category output

How do I limit the output of categories shown with <?php the_category();?> I only want to show one or maybe two categories that is associated with the current post, only on the home page. I'm ...
1
vote
1answer
18 views

Storing Array from returned database query and using the array in a new query

I'm currently storing results in a variable from a db table like this : $followed = $wpdb->get_results("SELECT user_id1 FROM wp_um_followers WHERE user_id2 = 1", ARRAY_A); This returns an array ...
0
votes
1answer
15 views

Extend Menu Walker Output

I've found a custom Menu Walker on the Internet that was perfect for my multilevel menu. It fitted almost like a glove. I've made some tiny improvements but now I need to limit the number of ...
0
votes
1answer
23 views

Put php variable in shortcode

I want to put the variable in the shortcode, but it is not working. What i have done wrong. <?php $calendar = getCalendarTag();?> <?php echo do_shortcode( '[ai1ec tag_name=".$calendar."]"]' ...
-1
votes
1answer
30 views

How to include a php file in every post and page [duplicate]

How to automatically include a php file in all posts and pages. The php file I want to add has a script which will automatically fetches a temporary video link every time the file is executed.
0
votes
0answers
13 views

PHP if-Statement for Custom Field in RSS Feed Template

I'm trying to set up my RSS Feed and Email Template so that it’s all working properly. The <description> tag in my custom feed is what is displayed in the email for the excerpt but I need it to ...
1
vote
0answers
31 views

Trigger a php file on every post or page if a condition is met

I was wondering if we can trigger a PHP file on every WordPress post or page if a certain condition is met. Let me detail what I want. Can we write a simple PHP script that will be automatically ...
0
votes
1answer
39 views

Limit tags shown in post

How do I limit the number of tags shown using the code below, without having to add $count=0; or if ($count <= to the query, but only for the home page, and a different number for each set of ...
0
votes
0answers
10 views

WP cannot resolve its own RSS feed - but the feed works elsewhere [on hold]

I just setup a new CentOS server and am having issues with my a WordPress installation on it. Neither my migrated nor a fresh install of WordPress can resolve their own RSS feeds using the default RSS ...
0
votes
0answers
19 views

Replace TinyMCE with Custom Built Editor

I am looking to build a custom wiziwig, and replace wordpress's TinyMCE all together. I figured out how to add to the TinyMCE editor, but thats not what im looking for. Does anyone have any references ...
0
votes
0answers
27 views

Email Inactive User on WordPress

I have seen this question all over but never seen an answer... I am using Paid Membership Pro and want to be able to have an automatic email go out if a user has not logged in for X number of days ...
0
votes
0answers
17 views

How to show single post from custom post type with shortcode

I know the topic have been around before, and have read extensively on the subject, without finding a complete solution. My goal is to have a shortcode that calls a single post, from my custom post ...
1
vote
1answer
19 views

JavaScript, best way to use data from the loop

I am trying to learn WP theme development. And at the moment I am trying to figure out how to use data from the loop in JavaScript. Lets say I got some JavaScripts functions in a external script-file ...
0
votes
0answers
21 views

Trouble implementing python on WordPress

I followed all the directions in this post and I still cannot get a result to display. I know PHP is doing something, because there is no text displayed whatsoever. The result has a header and no body ...
1
vote
1answer
27 views

Get the the title of Wordpress after comma

I've read that you can get the title before comma(,) Get the title before comma but wondering how can I get the title after comma(,) ? is it also possible to use strtok()? or are there similar ...
0
votes
1answer
27 views

How I can add div to menu?

I have div structure <div class = 'main-menu'> <ul class = 'menu'> <li class = 'item1'></li> <li class = 'item2'></li> </ul> </div> But I want ...
0
votes
1answer
25 views

How can I remove these resize lines from the comment box?

How can I remove these resize lines from the comment box? http://prntscr.com/8awm1c I'm using the theme twentyfifteen. I don't know where to locate them in the file manager or even the source code!
0
votes
0answers
8 views

modify the events calendar for wordpress

need help with ( the events calendar ) for WordPress, I'm trying to add day of the week under the number but its adding 5 days of the week under each number. see example here this is the code: ...
0
votes
0answers
17 views

Call function from WordPress function.php to page-home.php

I'm stuck at this. Please help. Basically, I'm trying to create a hover on image to reveal social icons effect. Clicking the social icon will take you to the relevant page of the social website in a ...
0
votes
0answers
22 views

How to make wp-login.php and wp-admin not accessible

Hello guys I wanted to limit my LOGIN and WP-ADMIN without using plugins. I have a network (multi-site): I have done so: wp-config.php define('WP_ADMIN_DIR', 'controlpanel'); define( ...
0
votes
0answers
21 views

How to display post content with some html tags?

Trying to output an xml file for single posts. In such file I need to display the content of each post in a way that can be accepted in xml format. After reading on the internet (for five days) I ...
5
votes
4answers
602 views

Should I write a PHP function in home.php?

I am trying to learn WP Theme development. And as I have understod all "wp core" functions should be placed inside functions.php. But what about custom functions? Lets say I would need a simple ...
0
votes
0answers
17 views

Product Category Page in Full Width

Initially the Product Category page is divided into Content Area (70% width) Side Bar Area (30% width) I have removed the side bar area using function.php. However the content area is still in 70%. ...
0
votes
1answer
24 views

Is_template how to add one more template

I have wordpress theme which is adding some scripts and css trought functions php. I want to add one more template file , but don't know how. Any ideas? This is what I have. Will be happy for any ...
1
vote
2answers
12 views

How to remove duplicate sub-menu name for top level menu items in a plugin?

I have written a custom plugin for wordpress. Once I add a sub-menu to the plugin I get a double entry for the top level item: I would like to disable the second "TopLevel" menu item so it would ...
0
votes
1answer
16 views

php if, else & custom fields - syntax error

I'm just starting to use custom fields and would like to use it to display an author box with (1) author photo (2) author name (3) author bio. I use this code in loop-single.php and it works fine: ...
0
votes
0answers
20 views

500 Internal Error appears after adding the codes in .htaccess file

The issue is: I have a Wordpress site running on 4.3 and using the theme from Envato Market (POND v2.0). And I ran a SEO test using this website (SEO Checkup Test). After going through the tips on ...
1
vote
1answer
19 views

WP Post Template - Templates in own folder

I am using the plugin: WP Post Template which allows me to use templates for custom post types. At present the plugin watches the theme root directory for pages with: <?php /** * WP Post ...
0
votes
0answers
9 views

Get stock from another store for a WooCommerce store [on hold]

I want a help! I am reseller of other stores, and as the store grows it becomes hard to manually update inventory. I have a custom field _url_font that I fill with product source address. I wanted ...
0
votes
2answers
37 views

Showing content from one page on another

There are many posts that seem to strike around this area, but I'm more and more confused by each one I read. I have a page that shows the "Terms of Service" (id = 1086). I would like to display the ...
0
votes
0answers
6 views

Passing arguments to a admin menu page callback & add sub menu page?

I want to function add_submenu_page function html_panel Re-run. but Runs only once. This means that each page will have an increased number.But the number 1 show all pages. <?php $counter = 1; ...
0
votes
0answers
15 views

How to use plugin only for specifict page template [on hold]

I installed welcome message for wordpress like text which is fading out after some seconds automatically and it has no option to set it only on a main page. I'm interesed is there a way to use this ...
-3
votes
0answers
13 views

How do i get facebook chekins to wordpress site [closed]

How can i get only facebook checkins to site . I want to display checkins from facebook to site.
0
votes
0answers
25 views

PHP > Scheduled Tasks > Sending daily email with dynamic API variables

I'm trying to write a PHP cron job that would call an API, return a set of numerical variables, calculate a second set of variables, and send an email to selected recipients with those variables ...
1
vote
2answers
39 views

Making plugin unique to not conflict with plugins with the same name

I have plugin that has the same name as other plugin uploaded to wordpress.org How can i make it unique so it doesn't share "View Detais" link and auto-update with other plugin uploaded to ...
0
votes
0answers
21 views

How do I change the button “comments”?

How do I change the button "comments" in theme twentyfifteen to "..."? I'm assuming it's in the comments.php file? I could be wrong. I'm referring to this area. prntscr.com/89nr1q <?php /** * The ...
0
votes
1answer
27 views

how to get attached file url for current post?

Trying to get the attachment file url for current post, using this code: if ( is_singular('post') ) { $args = array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_status' => ...
0
votes
1answer
21 views

How to style injected code in header section?

Trying to add custom code to header section <head>..</head>of the blog by adding this code to child-theme functions.php // Add scripts to wp_head() function child_theme_head_script() { ...
1
vote
0answers
14 views

Detect a focus on wp_editor

I wan't to detect/callback when a wp_editor(..) output text-area/content-editable is focus. Quite a simple question that I could not find anywhere. <div class="compose-body"> <?php ...
0
votes
0answers
20 views

how to print variables in wordpress 4.3?

A few months ago I wrote a little woocommerce plugin that does some curl requests. So far so good just that a few days ago I updated my Wordpress to 4.3 and Woocommerce to 2.4.5. Now I can't var_dump ...
0
votes
2answers
22 views

Rearrange get_categories array compared to another array

I've got a function that pulls the latest post from each category and arrange categories by latests posts. What I get from this is an array with category ids which I want to use to rearrange the ...
0
votes
0answers
14 views

Numeric values associated to admin menu bar

I'm customizing my admin left hand menu and am having an issue coming up with some of the numbers. I've even gone through the option of counting as I save out my code to confirm their sorting order ...
1
vote
1answer
24 views

max_input_vars: how many am I using?

I'm processing a large amount of Options in a Wordpress theme. I want to ensure I keep below the default 1000 before hitting a max_input_vars error. Is there a way to test how many 'input_vars' I'm ...