Tagged Questions

Themes create the public (front-end) interface for a WordPress site.

learn more… | top users | synonyms

0
votes
0answers
29 views

How to set separate “lang” attribute for post or page titles

I am creating a multilingual website in English and Hindi on WordPress. Half of the site is in English and rest is Hindi. In a previous question asked by John Doe here at stackexchange s_ha_dum ...
0
votes
1answer
79 views

How to make an sql query to exclude everything but custom taxonomy terms in table wp_terms?

Problem Summary: I am trying to write a SQL query that returns only my custom taxonomy terms, but the table (wp_terms) contains all of the terms, even ones that I don't want (such as category terms, ...
0
votes
1answer
44 views

Replace all media (images)

I created a new theme for my Wordpress site and I need to replace all the media (images) on the site, since I am using all new image sizes (which are larger than the largest on my current site). 98% ...
0
votes
2answers
50 views

How is the `get_sidebar` function meant to be used to call a 2nd sidebar?

What's the proper way to call a second sidebar in the main home of my blog? And I mean 2 sidebars at the same time.... I might edit the question when I get further info, but now I'm feeling ...
0
votes
3answers
52 views

Is it safe to register a taxonomy without using any hooks?

I'm creating a Wordpress site in which I wanted to use a custom taxonomy in my theme options, which I had registered using the 'init' hook. But the problem was that the 'init' hooks gets fired after ...
0
votes
2answers
194 views

How to add font in wordpress

I have a oswald.woff font file downloaded from some free fonts site. Using ftp i have created folder called fonts in the themes folders. (i.e /wp-content/themes/esplanade/fonts). In the fonts folder ...
0
votes
1answer
120 views

best practices for updating wordpress theme

Need to use a new theme for one of my Wordpress websites, but at the same time I need to also keep the current theme live whilst I make changes. What is the best practice? Should I develop the theme ...
1
vote
2answers
79 views

Multiple filter conditions for WP_Query

I'm having a hard time figuring out how to accomplish this (really simple) task: Get 4 random posts, but only select from the 10 most recent posts. This works great for the random part, but ...
0
votes
1answer
42 views

Show category and description

I am creating a theme, and I would like to show each category and its description in front page. I used the following code, but it is only showing one of the categories without a link to its page but ...
6
votes
1answer
176 views

Any alternate TinyMCE4 themes / subthemes?

TinyMCE4 in WordPress 3.9 has some cool changes, but it seems to have only one "theme" included. Is there any way to make a sub-theme of the theme defined by CSS, and theme.js in ...
0
votes
1answer
34 views

How to get my [shortcode] rendered on the home page, other pages are fine

I'm using a child theme of Pixlex. The theme has a options panel to let me choose wether I want 2 or 3 columns on the home page and if those columns are to be filled with a post or page. I have one ...
0
votes
0answers
27 views

get_theme_mod return a blank value instead of saved value

when i try this and in colors section , get_theme_mod works well function tcx_register_theme_customizer( $wp_customize ) { $wp_customize->add_setting( 'tcx_link_color', array( ...
0
votes
1answer
201 views

Why is contact form not working?

I am using a custom contact form plugin from code.tutsplus but it is not working. It looks as if the form is sent because I get the confirmation badge, although I receive no email (I have tried ...
0
votes
1answer
53 views

Trouble creating custom sanitization function when uploading video files

I'm trying to create a Theme Customizer control in Wordpress that will allow the user to upload an MP4 and WEBM video, and in doing so I need to create a sanitization option to verify the file type. ...
0
votes
0answers
50 views

need help to Arabic text in WordPress in textarea

I am doing a worpdress theme which is in Arabic language. When I write anything in Arabic. It turn into u0646u0646u0646. This appear in custom meta box here my code :- function ...
0
votes
1answer
67 views

How to know if a child theme is being used?

I have inherited the job of editing my agency's webpage. I didn't create the site, and I am not sure whether the IMW custom theme that is active is a child type theme for 2011, or whether all ...
0
votes
0answers
31 views

How to store and retrieve the attachment alignment?

I am working on a project, where I want to display all image attachments of a post. Getting the URL and size of the images is not a problem, since both get stored in the database, if the image gets ...
0
votes
1answer
19 views

Where to put a migration script to switch post information?

I just changed a crucial aspect of my theme, and posts tagged with a particular taxonomy called position are now handled by a custom meta field called cmb_position_name. Posts that have the taxonomy ...
0
votes
1answer
36 views

How can I demonstrate themes well?

How can I demo Wordpress themes well? I'd like to avoid any undo labour or inefficiency. Perhaps one Wordpress for links to different themes (example.com/themes), and each link goes to a second ...
3
votes
1answer
59 views

Confused about image sizing business in Wordpress

I'm creating my first Wordpress theme and I've got everything working fine, and by following this tutorial and few others I've understood how to add custom image sizes by using add_image_size() ...
-1
votes
1answer
32 views

Enqueue script/style with multiple GET parameters

I am trying to enqueue a style with two GET parameters, but the output is not correct. Here's what I have: wp_enqueue_style('colors-css', '/root/assets/css/colors.css?style=blue'); The problem is, ...
1
vote
1answer
36 views

Change content layout based on menu hierarchy

I've tried googling this one but I can't seem to find the right keywords. What I'm trying to do is to have the content of a landing page flow exactly like the hierarchy of the navigation menu. For ...
0
votes
0answers
12 views

Order posts by how many categories it is assigned to in total

I'm already doing some custom ordering based on various stored custom fields but this latest one has me stumped. I know I can get the count for how many categories a post is assigned to, but this only ...
0
votes
0answers
7 views

Add postMessage to existing customizer settings

I'm trying to add postMessage to the transport of all the pre-exisiting wordpress customizer options. I don't want Site Title & Tagline etc to refresh when I change them. Is there a way to make ...
0
votes
2answers
114 views

How to add oEmbed support to my theme?

oEmbed does not seem to work on my theme. I simply see the bare URL. I haven't been able to find instructions on how to implement it. Thanks.
0
votes
1answer
44 views

Directory structure for plugin changes

When I'm working in Wordpress, I quite often need to make adjustments to plugins. The recommended method, as I understand it, is to take the plugin file I'd like to modify (say, mypluginfile.php), and ...
0
votes
1answer
138 views

Hide certain pages / posts on wp-admin, show custom filter

I'm integrating a separate ecommerce CMS into a wordpress theme, using page templates for some pages such as the basket, search and checkout pages. This is working out pretty well so far. However, ...
0
votes
0answers
16 views

Post is in 2 categories - how to see the current active menu element?

Ok just imagine you have 3 categories. Projects, newsfeed and notimportant. You add a new project to projects and at the same time, want it to be in the newsfeed as well. Now when you click on the ...
0
votes
1answer
79 views

Adding class to the parent of current-post-ancestor / current-menu-parent / current-post-parent

Following situation: I have a drop down menu. At the moment we are located on a single post of the category "Produkt Design" Its class in the menu is menu-item menu-item-type-taxonomy ...
0
votes
1answer
52 views

TinyMCE strips content while pasting. Possibly a bug

I have a shortcode that has a 'style' attribute for a theme that I'm creating, which looks like this: [shortcode_name type="normal" style="fixed"] Now if I paste this in the TinyMCE editor, I get ...
0
votes
0answers
59 views

Theme Loading Into Dashboard

I'm having this really weird, never seen before, issue ... whenever I visit the Dashboard, after about 3-5 seconds, my theme loads into the Dashboard layout. It's like the theme's stylesheet is being ...
1
vote
1answer
143 views

Create a theme by combining a parent and a child theme

I have an existing parent theme and a child theme. I have a need for one theme that has the power of the parent theme and the design of the child theme. Is there anyway to quickly combine these two ...
6
votes
2answers
261 views

Auto get_header and get_footer on every template?

Is there a way to automatically run get_header() at the beginning of template and get_footer() at the end of it? Currently my code is too repetitive with those calls. I've been looking for a way to ...
0
votes
0answers
36 views

default value not getting displayed in input field

I have written code for creating theme options but default values not getting displayed in text field Also settings saved message also not getting displayed <?php // Default options values ...
1
vote
1answer
166 views

date_i18n() issue

I'm trying to use date_i18n() to display a localised date in my theme. <?php echo date_i18n( 'F j, Y', strtotime( get_the_time( "Y-m-d" ) ) ); ?> However, this always returns the English ...
0
votes
0answers
245 views

Nav menu custom walker not working in child theme

I have created a parent theme with a nav menu walker that works fine. I want to create a child theme to show small variations to the client. When I put the same code in the child theme it doesn't ...
0
votes
0answers
26 views

Giving auto update functionality to my theme

I have created a free wordpress theme. I want to give the users the ability to auto update the theme from the dashboard if there exists a update in mysite. We can see that when we are using ...
0
votes
0answers
598 views

Change the sidebar from left to right twentyfourteen theme

I am creating a site using 2014 theme. I would like to remain with the theme but however, I am interested in shifting the side bar from left to right as it is more ideal for my site. Is it possible to ...
-1
votes
1answer
175 views

Hardcode a form in Contact Form 7 [closed]

I've been digging a little into Contact Form 7 source code without success, but I was wondering if, like in Advanced Custom Fields, it's possible to hardcode a complete form (fields, recipients and ...
0
votes
2answers
23 views

Automated Footer information

Working on a theme and I'd like the copyright and title texts on the footer to be automated. It works but the tittle switches to the current page instead of the website's main title when you switch ...
1
vote
1answer
40 views

Add “Delete” button to my Theme

I'd like to be able to delete my custom theme from within Wordpress. This option is available for the default themes, via the screenshot link below. There is a red "Delete" link in the Theme ...
0
votes
3answers
691 views

Style.css redirects to 404 Page not found

I've just uploaded a wordpress site from MAMP to a live site. Exactly the same methods I usually use to upload them, including permalinks and all the usual PHPMyAdmin bits. This time the style.css, ...
0
votes
1answer
106 views

Why adding Categories does not auto refresh in Backend while using my custom theme?

If I am using my own created custom theme, the Post Categories Page in admin panel is not getting updated automatically when I add a new Category. To see the new category I have to reload the page ...
0
votes
0answers
44 views

How to create a button for importing demo content (.xml file)

I want to create a button (Import Demo Content) in my theme option panel. If user click Import Demo Content button then selected .xml file uploaded automatically and send successful message. I ...
1
vote
1answer
41 views

Conditional statement to show pagination

I'm using pagination to navigate between posts from the same category. Here is my code: <div class="article_single_prev_next"> <div class="article_prev"> <?php ...
0
votes
2answers
156 views

How to register and enqueue JavaScript files without breaking plugin dependencies?

In theme development, what is the best way to register and enqueue JavaScript files to avoid problems with plugins? I want to create a theme which uses scripts like jQuery, Masonry and so on. I ...
0
votes
1answer
36 views

How to show part of the_content?

i wanna show 20 chars of the_content i tried this but doesn't work for me . <?php $content = ''; $content = the_content(); $count_content = strlen($content); if($count_content > 20 ) { ...
0
votes
3answers
630 views

How can I conditionally show different home page templates based on whether or not the user is logged in?

How can I conditionally load HTML for the home page based on whether or not the user is logged in? Currently my theme has an index.php file. In that file I tried to create: <?php ...
1
vote
2answers
107 views

Why won't my taxonomy query show up?

I'm attempting to display posts from a 'Uncategorized' category under a custom taxonomy called 'Reviews' but without much luck. I'm using get_template_part('loop','review') to call loop-review.php ...
0
votes
1answer
252 views

Custom theme won't use search.php

I have a custom searchform.php and search.php in my theme. However, when searching for something all I see is the front page (with mysite.com/?s=something in the adressbar). I use a filter to make ...