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

learn more… | top users | synonyms (1)

0
votes
0answers
30 views

Displaying recent posts on static page with template-part via shortcode

So, I'm taking my first shot at creating my own custom Wordpress theme with Underscores. I have everything straightened out, with the exception of one last thing I want to add. I would like to add a ...
0
votes
2answers
49 views

Wierd site output [on hold]

I'm quite new to Wordpress, I've build a website and found out in the Google WebMaster tool that one of the most present keyword was [%%LINKS%%]... I've found this code: <div ...
0
votes
1answer
45 views

Parse error: syntax error, unexpected end of file in functions.php on line 487 [closed]

After seeking a solution about thumbnail size, I found in wordpress codex some codes and when i add them in editor in function php my blog stopped working. It is a blank page with this error message : ...
0
votes
0answers
25 views

Notice: Trying to get property of non-object

I got the notice on this line : $team_options[$category->name] = $category->slug; $team_categories = get_terms('team_types'); $team_options = array("All" => ""); foreach ($team_categories as ...
0
votes
1answer
10 views

Wp Debug Enabled True Notices and Warning

Notice: Undefined index: Zumpito_event_full_day in /home2/michael/public_html/domainname.com/wp-content/themes/themename/included/main.php on line 246 Warning: Cannot modify header information - ...
0
votes
0answers
24 views

Cannot get custom links to show using wp_get_nav_menu_items

$args = array( 'post_type' => 'nav_menu_item', 'post_parent' => $id, 'orderdby'=> 'menu_order', 'output' => ARRAY_A ); $childs = wp_get_nav_menu_items( 4, $args ); ...
0
votes
2answers
42 views

How do I correct the code in php? [closed]

I am new to PHP and I'm unable to solve the code. It's showing an error. <?php function thumbImg() { if ( has_post_thumbnail() ) { the_post_thumbnail( array(54,54) ); } else { ...
0
votes
0answers
15 views

migrating user and passwords from jshop to wordpress

Hi i am migrating from jshop to wordpress so i also want to migrate old website users but there passwords a encryted using md5($string.$salt) method but then if i add user to wordpress database then ...
1
vote
1answer
23 views

How to echo text in browser instead of download junk file?

I have a custom plugin that was developed for me a while back and I'm trying to tweak it's action and fix a slight bug. Based on certain conditions, the plugin presents the user with a custom ...
1
vote
1answer
34 views

WP Query with custom Shortcode

I have the following in my functions.php:- /** * Shortcode: Latest Properties */ function latest_properties_func( $atts ) { $args = array( 'posts_per_page'=> 5, 'post_type' ...
0
votes
1answer
24 views

Twentyfifteen style author comment

I am using twentyfifteen and I have made a child theme. I am trying to style author comments differently than visitor comment. In other words I want the author replies to have a black background. ...
1
vote
0answers
15 views

Update user profile information from functions.php

I have the following function in my functions.php file:- function apply_for_job() { $job_id = $_GET['job_id']; $user_id = get_current_user_id(); $prev_value = get_field('applied_jobs'); ...
2
votes
4answers
70 views

Trim first 2 words of the exceprt

I am currently pulling in the post excerpt however there are 2 words at the start of it that I would rather not have in this particular place as there is a title already. I have used wp_trim ...
-2
votes
0answers
13 views

Classifieds theme: create a report this listing feature

I am running a classifieds site on WordPress. I would like to have a "report" or "flag" feature on the listings that makes it so that people can flag inappropriate listings and they go to my "pending ...
1
vote
0answers
8 views

auto-populating custom nav with all items from custom post type

I have written the following code to take all of the posts in my custom post type "products" (created with ACF) and inject them each as an <li> in a custom nav menu. Everything is working ...
1
vote
0answers
28 views

add_action shortcut?

I think in PHP 5.4 or above (don't remember the exact version), instead of writing: function some_function() { } add_action( 'init', 'some_function' ); One can pass an anonymous function: ...
1
vote
0answers
22 views

PhantomJS with wordpress

I know it sounds basic but I'd really appreciate some help/guidence on how to use phantomjs on my wordpress project. I'm using Windows 8.1 and local host with xampp for now. I've downloaded phantomjs ...
0
votes
1answer
42 views

Redirect to another page not working SOLVED!

I have a custom page template (1 file only, contains with CSS, HTML and PHP) with a form and it will send an email after the user click the submit button and it will redirect also to another page. ...
-1
votes
0answers
22 views

How do I put a slider within a post loop?

so i know the title is a bit vague, as I couldnt accurately describe my issue for the title. You can kind of see what im goin for with this snippet if( 10 === $woocommerce_loop['loop'] ) { echo ...
1
vote
2answers
24 views

Custom theme: Alternatives to long list of 'include' in functions.php

I'm building a custom theme for in-house use only. I started by putting a lot of the core functions in plugins, but then that seemed silly since they don't require any user interaction. Next, I put ...
-1
votes
0answers
15 views

Problem with loading posts

I'm using a plugin to load more posts onclick called "ajax load more". Here is my standard code for echoing out posts: <div id="content"> <?php query_posts('showposts=3'); if ...
3
votes
1answer
62 views

Displaying post per day

Currently I have the code displayed below. <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12"> <a ...
0
votes
0answers
17 views

Wordpress Custom Post - Default Order in Admin

Here is my code. add_action('pre_get_posts', 'pre_get_kurs', 1); function pre_get_kurs($query) { if ($query->is_main_query() && ($orderby = $query->get('orderby'))) { if ...
1
vote
1answer
23 views

If post has custom field then display css-class

I would like to display a different icon in an i tag if a post has a certain key of a customized field. In my example Preis: <i class="(get_post_meta(get_the_ID(), 'Preis', true) != '' ? echo "fa ...
1
vote
0answers
24 views

Dynamically change feature image in customiser

For this client's Website I am making on their homepage there is a section called featured products with images showing off the product. Currently I have to update these images manually through my ...
0
votes
1answer
31 views

How to change <html lang=“bg-BG” , but only for one page

I spent last 4 hours searching for an answer how to change html lang="bg-BG" to html lang="en-GB". I already reviewed the old topics, and it seems that define ('WPLANG', 'xx_XX'); is not working ...
1
vote
1answer
16 views

How to use copy() function and paste file in /wp-content/themes directory

copy("http://localhost/medium/theme.zip","themenew.zip"); currently it is pasting file in wp-admin folder, Is there any way I can copy .zip file to /wp-content/themes directory. Thank You :)
1
vote
0answers
18 views

WordPress Quick Question . How to Get Parent Link in Submenu in My Code

I'm creating a menu walker from foundation 6 but problem is parent link is not click able, so solution might be that if we can get parent link in submenu but have some problem because I'm don't know ...
-2
votes
0answers
17 views

Fetching trash iteam while export

Hello All i have customized visual form builder plugin as per my requirement, I developer custom option like admin user can export the entries as pdf export of the submitted form (As default it has ...
-4
votes
1answer
33 views

How do I link the side images?

This is my site: http://classichits.ie/ I want to link the background image to another page. This is the code I have so far: body.boxed-layout { background-image:url(<?php echo ...
0
votes
1answer
23 views

form built dynamically with php, not submitting

On one of my wordpress admin pages, I am building a form to add new mailers. I have it checking the templates mysql table and building the list of available templates, then also giving it the option ...
0
votes
2answers
25 views

Commenting out unwated CSS/scripts in HTML with PHP

I am trying to comment out unwanted CSS and JS files to prevent them from firing in the HTML by creating a simple function in my functions.php. So far I have: function commentStuff() { $stylesheet = ...
0
votes
0answers
19 views

Keep getting PHP memory error

I'm building my custom menu on my WordPress/WooCommerce site and I'm only about 20% done with the number of links I need on the menu. However, now I just get a PHP memory error when I try and save ...
1
vote
0answers
36 views

Get the date of the className or classID

Is it possible to get the date of the class name or class ID? I just used the following to get the date of the post, but there are image galleries and each image has a different upload date: echo ...
0
votes
1answer
32 views

Renaming “Expand Details” within “Add Media”

I was wondering if it was possible that the "Expand Details" option via "Add Media" can be renamed? I couldn't find a guide online so I thought I would ask here for guidance, (that's if it's ...
1
vote
2answers
28 views

Custom plugin: Trying to show saved data on frontend

I'm working on my first plugin and I have made a nice settings page which saves and works. But I have split it to few files and now I can't determine if field is checked.. I have also tried ...
1
vote
1answer
34 views

How to run PHP code in Text Widget with no plugin in WP 4.4

Before I had the following code in the function.php add_filter('widget_text','execute_php',100); function execute_php($html){ if(strpos($html,"<"."?php")!==false){ ob_start(); ...
1
vote
0answers
27 views

Importing Product Variation Images Swatches

I want to upload several thousand variable products to Woocommerce using the WP All Import plugin. I also want to display product variations using the Color or Image Variations Swatches plugin, which ...
0
votes
0answers
34 views

How to limit number of words per line?

My theme info : Newspaper Ver 6.0 My problem : I want to limit number of words (say like 5 words per line for example) in a line in my content area. I'm not intending to add any h2,h3,bold texts, ...
0
votes
3answers
38 views

I installed Wordpress locally now how do I login?

I downloaded a WordPress website that I am modifying for a friend. He gave me access to cPanel, where I downloaded the SQL and changed it on XAMPP. Now when I open >localhost/wp it opens the ...
0
votes
0answers
15 views

Upgraded to WooCommerce 2.4, single product page is dying after displaying title

This issue started when I upgraded from WC 2.2 to 2.4. I just upgraded to 2.5 and I'm still having the issue. For some, but not all products the single product page dies after displaying the post ...
0
votes
2answers
40 views

Post to WordPress from another Server via PHP

I have running a wordpress site on - lets say - "site.com" and another site "input.com" hosted in completely different locations. As the name suggests, "input.com" should be used as a input site with ...
1
vote
0answers
13 views

How to assign a customer to an order?

I have a problem assigning a customer to an order using a php script. Is it even possible? I know, that it is possible to get the customer ID back from the order, but I can't find a way, how to set ...
0
votes
0answers
20 views

2 different Home Pages for different language url part

I'm in trouble with multilanguage site I would to have for all pages under url www.example.com/EN An EN HOMEPAGE and for www.example.com/IT another HOmePAGE. How can I dot this? I already know this ...
0
votes
1answer
16 views

Querying for specific tags

I currently have this code that pulls all of the tags and creates a list with links for them: <?php $tags_array = get_tags(); foreach( $tags_array as $tag) : $tag_link = get_tag_link( ...
0
votes
0answers
20 views

Lazy loading Ajax offset not working

I am attempting to create a lazy loading ajax feature on my site. There is a 'click more' button which will then load 10 posts via ajax and append them to the HTML container. I want to display 10 ...
0
votes
2answers
24 views

using the_permalink to echo an href into a <li>

I'm trying to make a menu that automatically populates from a custom post type I have and I'm having some trouble getting it right If someone could point me in the right direction I would greatly ...
0
votes
0answers
13 views

#1062 - Duplicate entry '1' for key 'PRIMARY'

I am trying to move my database from my usbwebserver to my online server. But I get this error, can anyone help me with this? #1062 - Duplicate entry '1' for key 'PRIMARY'
1
vote
0answers
13 views

Output custom field value to post string

I am trying to get a custom field called "u-courseid" its a field that was created by a theme plugin. My goal is to output the value of this field after the post name. So the output would be " Post ...
0
votes
1answer
31 views

Accessing an image via ajax

The goal with this is to create a random banner, managed in the wp admin. I can create a banner solution in the wp admin without an issue but need a little help on the ajax side. I have an image ...