0
votes
1answer
45 views

Custom post type and category link together

I have issue with making new page for this : Category link is : /category/category_name But I want to be : /custom_post_type/category_name Custom post type code $labels = array( ...
0
votes
2answers
18 views

Importing featured image to posts, duplicates the image

I'm using wp cli to import the same featured image for around 2,000 posts. I did a couple tests to see if the image would be duplicated or if WordPress would notice that the image already exists in ...
0
votes
1answer
533 views

Multisite - Redirect All Users to Subsite Home Page on Subsite Login

I have a WordPress multisite network and would like to redirect all users who log into a subsite to the subsite's home page. I have found many plugins and functions.php code that redirect to the ...
-1
votes
3answers
467 views

Moving Categories submenu to Media, but still opens Posts menu

I'm developing a very media-centered site with WordPress and am using the default categories and tags on uploaded media using, in part this plugin Media Categories. I am displaying a sub-menu item ...
0
votes
1answer
640 views

Remove current class from sub menu items

I am building a wordpress website with drop down menu (sub menu). To achieve this here I am using wordpress walker class. This is the code which I am using in my functions.php class ...
0
votes
1answer
20 views

How to order users alphabetically by name? in plugin UPME

I have this code: <?php class UPME_List_Cards { public $upme_options; public function __construct() { global $upme; add_shortcode('upme_latest_members_list', ...
0
votes
0answers
23 views

Show avatar, alternative avatar, or blank avatar

On author.php, I am already using the following get_avatar code with fallback, to 1) show a user avatar or, 2) if none is present, show a generic avatar_default.png: <?php echo ...
0
votes
0answers
9 views

Problem with Taxonomy Images plugin

I'm using Taxonomy Plugin to connect images to categories, but the problems appear when I tried to keep only one category to list images. I change this: <?php print apply_filters( ...
0
votes
2answers
4k views

Custom Taxonomy with tax_query

So I've created a custom taxonomy type with a plugin (CMS Press) and now I'm trying to get all of the posts with the taxonomy terms in that taxonomy. My get_posts looks like this: $args = Array( ...
2
votes
2answers
90 views

Search & Remove Specific Shortcode From All Posts

Question Is there a way to remove a specific shortcode, say [print_me] from all the posts where it appears in one shot. And I don't mean mask it or filter it so it doesn't show up while it stays in ...
0
votes
0answers
11 views

Implementing a javascript carousel [on hold]

I attempted to add this code into my website, using the MH lite Magazine template and it made my site crash. How do I implement this code into my site to display the carousel with images? Here is ...
0
votes
0answers
16 views

Front end post submit with custom taxonomy and category

On my website i'm buildng a front end post publishing based on this article. All my posts have both category and a custom taxonomy. The problem is that I can't find a way to save both default ...
0
votes
2answers
42 views

Why 'do_shortcode' doesn't work in a REST request?

Why do_shortcode doesn't work in a REST call ? In the example below, do_shortcode exists, but the shortcode isn't interpreted. Route declaration /* Adding a route with callback is ...
2
votes
1answer
18 views

Override plugin localization

Is it possible to override the localization files provided (or not provided) by a 3rd party plugin? A plugin that I'm using now doesn't have any language files but I want to avoid having a future ...
3
votes
1answer
508 views

wp_insert_post extremely slow on big table, direct query very fast

My posts table is about 600K, and I don't consider this big at all. Anyway wp_insert_post is becoming very slow. I am trying to import a huge list of hotel information into Posts. The list is about ...
0
votes
1answer
22 views

How to make picture appear on wordpress site shared link?

I would like to know how to make a piture appear on the thumbnail to the left of the text when I share a link of my wordpress on facebook. I dont post any images to the website, but would still like ...
0
votes
1answer
19 views

If Portfolio item has tag, add CSS

I've recently purchased the Stockholm theme and am trying to customize it: I would like to have the ability to mark certain Portfolio Items as being 'SOLD' with black squares in the top-left corner, ...
0
votes
1answer
2k views

How to insert category and subcategory using 'wp_insert_post' function?

How would be the array, to insert a post category and subcategory? Thanks.
0
votes
0answers
19 views

Facebook sharing scraper grabs different data on different servers for same site

-- Update 04/29/2016 -- It turns out the URL was being redirected if it ended in a set of numbers, but only if there were no letters within the set of numbers, and only when Facebook was scraping the ...
0
votes
0answers
11 views

meta_query in $args ignored when called from theme

I have the below function in my plugin in the MyManager class. public static function test() { $numRowLimit = 6; $arrArgs = array( 'posts_per_page' => $numRowLimit, ...
0
votes
0answers
18 views

Changing home page url depending on user login

I need to change the home WordPress page depending on user type login, When one user login with type='subscriber' I need to redirect this user to another private page and change home URL. I tried it ...
0
votes
2answers
630 views

404 Error while accessing the font files

Added a custom font as follows Uploaded web-font files and given them the 777 permission http://example.com/wp-content/themes/mytheme/css/fonts/ Added rules to the css file @font-face { ...
-2
votes
1answer
12 views

How to attach multiple images to post title using front end form and retrieve them? [on hold]

Photo //upload to dashboard $_POST['fname'], 'post_content' => $_POST['message'], 'post_status' => 'publish', ...
0
votes
0answers
49 views

Filters, priority when run after plugins_loaded

In my main plugin I filter the_content to add rich snippets. Something like this: add_filter('the_content', 'add_schema'); function add_schema( $content ) { $schema = NULL; //To avoid undefined ...
0
votes
0answers
32 views

Theme Unresponsive in Wordpress 4.5 (4.4.2 Ok)

We're testing WP 4.5 in our Development Environment and found that our custom theme is wrecked by the update; more specifically, the page stops loading content but acts as if its still loading after ...
1
vote
0answers
12 views

Add 'Last Modified' and Attachments (Yes/No) to WordPress Users Column

I was wondering if someone can put me on the right path in regards to adding additional columns that show the last modified date and if a user profile has attachments. Ideally I'd also like to be able ...
0
votes
1answer
632 views

add_rewrite_endpoint not working

I've been having looot of troubles with this function, I don't know what to do, because I tried everything. I have a custom post type, let's call it study. The url structure for it is ...
-2
votes
0answers
7 views

How can I extract all products (and their attributes), and display+order them as text/links in a table? [on hold]

My client is giving courses/training, and his customers can order their place through Woocommerce I made the attributes 'date' and attribute 'time'. For 'date' there are 3 values; august 4, august 8, ...
0
votes
2answers
31 views

Admin menu disable new/delete page

So I've been tinkering with the admin roles and I can't seem to be able to revoke create page rights for the admin. I can only find 'Edit page'. If I remove Edit page, the entire pages tab goes ...
12
votes
5answers
1k views

How to mark every 3rd post

I'm working on a WordPress site for my band and I'd like to mark every 3rd post on our blog page to have a special class applied to it, anybody have any pointers on how to achieve this? Any help is ...
0
votes
0answers
9 views

Strategy for organizing JSON/tabular data the wordpress way?

Situation: Have to import about 20-100 JSON objects into wordpress, which will NOT be displayed at all, but will be processed with other data for view. Example JSON input: { "headers": [ ...
0
votes
0answers
6 views

submenu item under other top level menu and change some fields

I would like to add the 'Add new' user submenu to have a different name(in the menu) and under a custom top level menu that I created. I have removed most of the standard admin menu and replaced it ...
0
votes
1answer
430 views

Wordpress GET parameters causing 404 Not Found

all, I'm having a problem with my wordpress page while using encrypted $_GET parameters to obtain data. this is my function: function encryptDecrypt($key, $string, $decrypt) { if($decrypt) { ...
0
votes
1answer
8 views

get_user_by asking for string while string is given

I've added an extra field to the login form. When trying to get the user's value of that field(before checking if it's equal) I have a get_user_by('login', $username);. $username being an email ...
0
votes
1answer
16 views

Help to upload post attachments from Ajax

My problem is that I cannot upload post attachments from a frontend form. I send data through AJAX to my php files containing functions. Let me be clear: everything is working great, the post is ...
0
votes
4answers
30 views

Hide Image On Wordpress On Single Page

Sorry, I know this kind of question has been asked before but I can't quite figure it out. I'm trying to hide the city image on this page: http://learnenglish20.com/buy-tokens/ I put this CSS in ...
0
votes
1answer
387 views

How to sort category by custom field value

I am using the following : $catargs = array( 'meta_key'=> 'category_custom_order', 'orderby' => 'meta_value_num', 'order'=> 'ASC', ); but I can get the ...
0
votes
2answers
9 views

$wpdb->last_error deosn't show the query on error

I am inserting data in the custom table using the $wpdb->insert. However, upon error I don't seem to get any information from $wpdb->last_error. What could be the cause of this? I already have ...
0
votes
1answer
768 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
0
votes
1answer
27 views

Foreach inside foreach

I got two taxonomies: "Colours" and "Recommended Colour" both have the same terms (same colours). I want to display a list of all terms of the taxonomy "Colours" and mark one colour as recommended. ...
0
votes
1answer
16 views

Wp_mail doesnt work

I created a form for mail sending, but it does not work. Email function is enabled in php. if (!$error_msg) { $to = "mail@to.send"; $headers[] = 'Content-Type: text/html; charset=UTF-8'; ...
0
votes
0answers
9 views

How to bypass browser popup when using web service in wordpress? [on hold]

When I hit this http://username:password@siteurl.com it will give pop-up in browser. How to bypass this? Thanks.
0
votes
1answer
12 views

Login_form add to top of form rather then bottom

I have added a 3rd field on the login page, but it shows at the bottom(underneath password) while I would like it to show above Username. How can I manipulate the order of fields? This is the code I ...
0
votes
2answers
31 views

Get Custom URL For Custom Taxonomy

I've got a custom post type called productpopups, and to sort them I have a custom taxonomy called productcategory. The post type has it's own special template (single-productpopup.php) and I'm trying ...
0
votes
1answer
873 views

Search Custom Post Type & Taxonomies

The site I'm building has a directory element, which has a lot of different business listings; this is a custom post type. It has a Custom Taxonomy called Trades under which are different types of ...
0
votes
1answer
18 views

Load get_page_templates into select menu

I am using WordPress' Theme Customizer where I would like to add an option for the user to select the page template used. Here is the code to get the page templates. This is the section that needs ...
0
votes
1answer
459 views

How can I customize the size of the header of my theme?

I want to change the size of my header using the Sparkling theme. In functions.php, right below this: /** * Implement the Custom Header feature. */ I added this: add_theme_support( ...
2
votes
1answer
27 views

(un)wptexturize() — is it possible?

I have some text stored in a string $text that's filtered through the_content and therefore, wptexturize(). wptexturize() is a function that replaces various characters into more prettier ones. Is ...
1
vote
1answer
42 views

Make a custom loop inside single.php with pagination

I want to create a custom loop inside a single-ediciones.php file and I need pagination (actually AJAX pagination). I need my normal loop because I need to show some data of the CPT "Ediciones" and I ...
1
vote
1answer
433 views

Remove nav menu item by script

I want to create my custom nav menu using a script in a wp plugin. I'm almost there using this tutorial. All I need is the option to delete menu entries. something like ...

15 30 50 per page