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

learn more… | top users | synonyms (1)

-1
votes
1answer
14 views

Adding logo to Wordpress header

I want to add a logo to my header for a website im building, where in this code would I put the image URL? The theme im using in Bones. <!doctype html> <!--[if lt IE 7]><html <?php ...
0
votes
1answer
29 views

Wordpress archive page showing 404 Error

This is the code for an archive page on my website, when I try to open this page, it brings up a 404 error and doesn't display any content. Is there a problem in this code that is stopping it? I am ...
0
votes
1answer
29 views

Print out Wordpress user ID - two sites with same code but different output

Trying my luck once more with more smarter and awesome peeps =D In my last question the issue was regarding getting wordpress user ID, which worked perfectly after someone steered me in the right ...
-1
votes
3answers
28 views

Using PHP for background-image property

I'm building a gallery page for a website and want to use the images from post types as background images with lightboxes. The code im using currently is this: <div id="primary" ...
0
votes
1answer
23 views

How to get the filename from file system and create a download link?

I have a custom page template. This template have a custom form, the user can upload a file in that form and input his/her personal infos. The file will save in the file system. I want to create a ...
0
votes
1answer
32 views

Get wp_current_user_id using PHP and MySQL

awesome people of the Stack Community! Like the newbie coder I am, it took many hours but at last I got: a HTML form inside wordpress -> to submit value to MySQL database -> and then store the ...
0
votes
0answers
21 views

Conditional display of author name with image

Just redesigned my site (well, ok “purchased a new theme” as opposed to me redesigning it) and wanted to be a bit fancy. Using the code below, which I used (and it works) in widgets, wanted to ...
0
votes
0answers
14 views

auto metakey value on post tile

I have this metakey "word_srch" the metakey has no value, i have to input the value in the custom field in the backed, instead, how can i create a function code that will automatically input the value ...
0
votes
1answer
23 views

wp_redirect only works on main site and not on other sites

My main site is https://www.domain.com/, all my multisites will have https://www.domein.com/multisite1/ link. I made a function in functions.php which will check if the option (in the admin panel) is ...
0
votes
0answers
14 views

Transfer custom post nav (prev/next) from one to another theme

I bought two themes and just want to assume a special next/prev post navigation from the first theme in the second theme. I've searched the theme files and found the function, which declares this ...
-1
votes
0answers
17 views

Changing php version breaks login

I'm using wp_login_form within a custom widget on a website I am working on and it works great when I'm using php5.3. When I use anything newer, the login form stops working. My question is, does ...
1
vote
2answers
25 views

Part of title duplicating but not sure how to remove from code - help?

I inherited a problem that no one in my office can figure out. Our company website has page titles in the format of "Page Name Company Name - Company Name." The first instance of Company Name is a ...
1
vote
1answer
19 views

Wordpress Search Results for Multiple Post Types

I want to show both posts and attachments in the search results. Basically, I need something that says if the post has a thumbnail, show it. else show the attachment image (since they don't have ...
0
votes
1answer
19 views

Calling PHP Titles inside Javascript Markup

I have a video gallery, and all the titles are generated by php. They are coming from my Wordpress media library's attachment titles. The lightbox for these videos, however, is customized in ...
0
votes
1answer
14 views

Subheader title depends on post - change to static

On site I have subheader, which always display last post title. I would like to have in this place static title, like "Blog" or "News". This is the whole code of subheader: <?php $output = ...
1
vote
2answers
32 views

Add custom HTML to posts page

I want to add a header image via some custom HTML to the posts page but can't edit it with the pages menu in Wordpress. Is there a way to add the HTML in the specific PHP-File and which PHP do I have ...
0
votes
0answers
23 views

Post information from plugin to static page Wordpress

I'm writting a plugin to Wordpress and i need to post an information from date base to static page. I do it by shortcode. Here is an example of plugin function code: function ...
0
votes
2answers
30 views

Is this Wordpress code causing page weirdness? Can't scroll to bottom

I have the code below on my homepage to list posts from a specific category, then a second piece to list posts from across the site. The problem I'm having is that there is some sort of weirdness ...
1
vote
2answers
36 views

Output array into one table cell

I'm trying to output an array into one table cell. Here is a truncated version of what I have now: $prerequisites = get_post_meta($post->ID, 'opl_prerequisites', true); $output .= '<td>'; ...
0
votes
1answer
21 views

Trying to get php to echo height and width to use for overlay

Hey so Im creating this overlay for Wordpress and was wondering if there is a way I can echo the height and width as an inline style so that way the overlay can have the same height and width as them ...
1
vote
1answer
122 views

WordPress Shortcode and Dynamic CSS

I have a question I would like to ask to the WordPress developers, Usually when creating a shortcode that need to generate custom css how do you proceed? For example a simple button shortcode with ...
0
votes
1answer
47 views

Meta box not saving

I am following Noel Tock's tutorial on making an Events CPT and so far I was able to show the custom columns and the custom meta box. The problem now is that I cannot save the data inside the meta ...
0
votes
1answer
34 views

Some links broken after updating Wordpress version

first post on here so go easy :) got a problem with a wordpress site (custom theme) http://expressduplication.co.uk which was built a few years ago by a company we are no longer able to get in touch ...
-1
votes
0answers
18 views

Wordpress pagination why is this not working? [duplicate]

I got the following code: <main id="main"> <?php // the query $args = array('posts_per_page' => 2 ); $the_query = new WP_Query( $args ); ...
0
votes
0answers
27 views

How can I add pagination to my loop? [duplicate]

That's my current loop: <main id="main"> <?php // the query $args = array('posts_per_page' => 10 ); $the_query = new WP_Query( $args ); ?> ...
2
votes
3answers
38 views

Wordpress loop specific thumbnail size

That's my loop: <main id="main"> <?php // the query $args = array('posts_per_page' => 10 ); $the_query = new WP_Query( $args ); ?> <?php if ( ...
1
vote
1answer
38 views

How can I add pagination and how can I change thumbnail size?

I'm currently learning wordpress development and I try to add pagination which displays a "older"/"newer post" link and the number of the current page at the bottom of the posts. I also try to change ...
0
votes
1answer
22 views

Using Custom Javascript and pHp to send email to myself when a user clicks on an input button but only works on Chrome, IE, and Micorosft Edge

So I am using jQuery and pHp together to send an email to myself whenever a user clicks on the update button of their Ultimate Member form. However, the email only sends when a user is using Chrome, ...
0
votes
0answers
8 views

Using Custom Fields to Create Post Tags

i have a wordpress blog with 25k+ posts that contain a Keywords custom field i found this code to Create Post tags based on custom field value but its not work on bulk edit: function ...
0
votes
2answers
36 views

List all categories but exclude current post category on single post page

I want to display a list of categories excluding the category of the current single post that the user is navigating on. The list is displayed on the single.php template. I'm using this code to ...
1
vote
1answer
21 views

Custom category code not showing all posts

I have a PHP template I am applying to several pages on my site so that they show a list of all posts in a category with the same name as the page. However, this is not working correctly in that posts ...
0
votes
0answers
13 views

Can't get post meta from custom post type metabox

I use Ajax Load More - Infinite Scroll plugin for output custom post type. I have custom meta box link_to with value /something - it's just link. In template of plugin i try to get it <a ...
0
votes
1answer
22 views

Can't get data from audio media

I am trying the get the data of an audio, I've uploaded to a Wordpress site I'm working on (Not my own). I'm quite new to WordPress, but as far as I know, media files such as images and audio is ...
0
votes
1answer
17 views

How to replace the default domain on wp get shortlink

<?php echo wp_get_shortlink(); ?> When using this line you will get mydomain.com/?p=1. I was wondering if I can change my domain like myalternatedomain.com/?p=1 while using this code?
0
votes
3answers
27 views

Ajax Load more CPT via shortcode

I have a problem with ajax load more for my CustomPostType. I think i have mistake but don't know where. If it possible to edit my code, i will happy. UPDATE I have create div cool to paste in it ...
-3
votes
1answer
32 views

Please help to know why single.php crashes after I add this code [closed]

This is my single.php. I'm using the Suffusion theme and the Advanced Custom Fields plugin. I'm trying to display custom fields based in a specific post category. The code works fine if I remove the ...
-2
votes
0answers
13 views

How can I include Portfolio Posts in latest Blog Posts?

I've started building my Blog here: http://zweierlei-brei.de So my question is, how can I feature the latest Portfolio Posts on the starting page, with the same Layout as the latest Blog Posts, ...
0
votes
0answers
19 views

Echo multiple tasks if a common function exists

How can I echo multiple tasks if a common WordPress function exists. For example, I want to reduce the following: <?php if (function_exists ('pluginName')) echo someName (1); ?> <?php if ...
1
vote
1answer
24 views

How do I remove the product thumbnail link from a specific div in Woocommerce? [closed]

I have a section on my front page that displays the top 4 most popular products from my Woocommerce shop. I is located within a div as such: <div id="trending"> <p ...
0
votes
1answer
16 views

Static home page ignored

I am trying to show an static page instead of posts. It is defined accordingly in Settings-Reading, and it works fine. It uses a front-page template. But activating Polylang (since my web should be in ...
0
votes
1answer
31 views

How to remove coupon dropdown feature

I want to remove the coupon drop down feature and just have the input field and 'add coupon' button on the checkout page. Does anyone know how I can get rid of the dropdown feature? Thank you in ...
0
votes
0answers
45 views

Add post order to function

How to add post order to this function? I would like to display most recent post from newest to oldest: <?php //Establish first post check variable $first_post = true; ...
1
vote
1answer
71 views

Upload Image in a Wordpress page using PHP

Hello awesome people of SE! :) Okay, so this is a little far-fetched but I'm trying to get a HTML form with a PHP upload script to work inside a Wordpress page. I can't use a plugin. It's supposed to ...
-1
votes
0answers
29 views

Breadcrumbs Not Displaying Parent

I made a breadcrumbs code with schema. However, the breadcrumbs only shows the home and child page rather than the entire hierarchy - it fails to display parent pages. Does anybody know what I might ...
1
vote
1answer
20 views

Count the number of times the search form template gets included on a page

I've got a template that has a search form in several locations. Each search form is identical, containing a text input, two radio buttons, two labels associated to the radio buttons, and a submit ...
0
votes
1answer
46 views

How to add aria role and schema markup to custom walker container

Edit: after doing some research I've found that in the wp_nav_menu function uses the following code to display the containers value. if ( $args->container ) { /** * Filter the list of ...
0
votes
0answers
36 views

WooCommerce: Making a loop create divs of categories, with category products inside

I have a php/wp script written which in theory should print a div with a category name, description, and all of its products inside. The code looks like this: <?php $args2 = array( 'taxonomy' ...
0
votes
1answer
27 views

add button to specific post

This code is designed to add a button to specific posts using the get_post_meta function. How do I alter the get_post_meta function to display this button on a specific post? I have already tried ...
0
votes
2answers
71 views

How to change post count in wordpress loop?

Hey I am attempting to customize my WordPress post loop to create different post styles for a certain set of posts. For example the first three posts would be styled in it’s own way, the next four ...
0
votes
1answer
23 views

show recent posts php code error?

I'm using this code to show my recent posts in my website: <div class="post_content"> <div class="home_posts"> <?php $args2 = array( ...