Tagged Questions

Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

-2
votes
1answer
20 views

My homepage's width has reduced and I can´t fix it

I am creating a site for a friend of mine and I'm having trouble with the width of my homepage. The homepage is set as a full width page but when you view it it only displays about 60% of the span. ...
0
votes
0answers
11 views

How to avoid hardcoded text in a custom page template?

I'm developing a company Website using Wordpress 4. This website needs some special, customized pages - with forms and GET and POST and a lot of stuff, so a lot of PHP code. Now, a CMS' main purpose ...
0
votes
2answers
81 views

create single.php for specific category by category id

I'm trying to create template for specific category with id 1 for example. The template should be applied to all of the pages belongs to this category. So, it should be something like single-1.php. I ...
0
votes
2answers
26 views

Different templates for same content, landing page from different URLs (generic, simple)

I was wondering if anybody has a good idea how to solve this cheap. Assume there are two urls: example.com/portfolio-xyz example.com/portfolios/someidentification ...
0
votes
0answers
28 views

How to generate custom loop indexes

Besides the regular taxonomies, such as category, tag, author, archive, I also have some special indexes to display, such as list of all sticky posts, simple chronological index of all posts, top ...
0
votes
1answer
39 views

How to make my category archive behave like a page

I don't want to use the category page as usual (list of posts). I would like to add more content: text, images, columns. Which is the best solution? Maybe redirect from a category page to a page? ...
0
votes
0answers
31 views

My rows are wonky! [migrated]

I am building a theme template page that calls up all the child categories of a particular parent and displays them so that they look like this: The only trouble is that when any row has less than 3 ...
-2
votes
0answers
7 views

Nofollow wordpress images [duplicate]

When we add media(images) in the default wordpress theme. I want to change the tag which which is used before the img and after the img. I want to add “ rel='nofollow' “ attribute to ahref tag.Like ...
0
votes
1answer
28 views

I want to rel=nofollow wordpress images

I have a default theme. When i add media to wordpress site. By default it use simple "a href" tag I want to add attribute "rel=nofollow" to it. Can anybody please point me in right direction?.
0
votes
0answers
22 views

Displaying all posts of a category in a page, using a template?

I am writing a plugin which (among others) wants to display posts of a certain category within a page. While I can do that with the various functions there are available (WP_Query etc) to iterate ...
0
votes
1answer
28 views

Get page id by template

I want to know if it's possible to get the ID of a page with a specific template. Is this possible to get the ID of a page that assigned to "page-special.php"?
0
votes
0answers
26 views

Redirect File Custom Post Pagination Problem

I've created a custom taxonomy type ( gallery-type ) for gallery post type! But, I didn't create for taxonomy-gallery-type.php in my theme folder, but I redirected to another php file from theme ...
0
votes
1answer
21 views

Taxonomy template by post type

I have 2 custom post types that share a taxonomy. The taxonomy template of my taxonomy ( taxonomy-my_tax.php ) will query both custom post types. Is there a way to have a taxonomy template for each ...
0
votes
2answers
37 views

Add Date & Author Meta to Category Archive Page

I want to add author name and date on category pages under Title. Here is the page But i don't how i can edit it ? where i have to go to find category template file. By Googling i found it is ...
0
votes
1answer
31 views

How do i load a different template for different users screen width

How can i load different templates for different screen sizes.Or is there some other method that i load different html for different screen size. Please help!!
0
votes
1answer
21 views

Adding text to the footer of each post based on tags or categories

Several of my posts in the same category have the same footer. I figured it would be much more maintainable if I could move this into a separate location and manage it from a central place. How can ...
0
votes
2answers
38 views

Only One Post of Custom Post Type Appearing on Template Page

I'm not sure if it's a database or template issue, but on this template page only one post of my Custom Post Types are appearing. There should be at least two. The page uses an isotope.js script, but ...
0
votes
2answers
21 views

Is it better practice to create many page templates, or a a few base templates with custom HTML added via TinyMCE?

I have been teetering back and forth on this question for a while and after a recent battle with TinyMCE, I wanted to get some input. If I am creating very different pages with unique javascript ...
0
votes
2answers
32 views

Creating custom page template

So, on my wordpress site I have page called "Books" and sub-pages, each containing info about some book. It looks something like this: Books Harry Potter, J.K.Rowling Some Other Book, Who WroteIt ...
0
votes
1answer
23 views

When a user registers, create a page from an existing template with their username as the page name

I am wondering if something like this is possible? If so, where would I start! I'm certainly not looking for someone to explain 100% fully and give free code examples etc, only a nudge in the right ...
-1
votes
1answer
64 views

Custom taxonomy template not working

I have created a custom post type named property, and a taxonomy named city is attached to this post type. There are several cities (terms) like toronto, taiwan,dhaka. I want to create a template ...
0
votes
0answers
88 views

admin-ajax.php not working after wordpress 4 update

n WordPress 3.9.2 access to admin-ajax was working for non loggedin users. When I upgraded the script stop working. I have the following code in functions.php function theme_name_scripts() { ...
0
votes
1answer
37 views

How can I make site-wide content editable, for example footer content

I'm new to wordpress, but I have enough developer experience. (the first thing I did was to get a blank template (blankslate) to start building up this wp site). I want to understand what are the ...
0
votes
1answer
35 views

Template_redirect for child custom post types

I currently have a custom post type called 'Services' which has two levels (parent and child). I need to load three different templates within this post type (1 for the parent, and two different ones ...
0
votes
1answer
31 views

How to add posts list to a page template?

I need to create a page which will have static content in the right column and list blog posts in the left column. The static content needs to be editable from Dashboard > Pages > Page. How do I do ...
1
vote
0answers
26 views

Using wordpress templating for html emails

Im working on a plugin that needs to send out an email after a form submission. Im using wp_mail for this, and it works perfectly fine. My problem is that in my code the html is generated by a bunch ...
0
votes
1answer
118 views

Avada Theme - Display results from a specific category [closed]

In the Avada Theme there is a page template called 'FAQ page', this 'FAQ Page' can have categories (faq_category_1) and in these categories there can be unlimited questions with answers. This part of ...
0
votes
2answers
53 views

Display title list of all post of current post type

I have a custom post type called press. I'm on the template single-press.php What I want to achieve is generate a list of the titles (with it's corresponding link to it) of all press custom post ...
0
votes
0answers
50 views

Send post id through ajax and get the post content back

First of all i want to say that I am a WordPress beginner :). I am trying to get a post content in a modal by using ajax. So i send the id through ajax, but i cannot execute the php code anywhere on ...
0
votes
1answer
10 views

Custom page template not being called

I've been learning Wordpress for the last few days but I'm having an issue with custom post types. I've registered the post type as below: function create_kitchen_type() { $kitchen_args = array( ...
0
votes
2answers
193 views

Custom Post Type with Nested Taxonomy and Template Files

I have a custom Post Type of "Portfolio" with a rewrite slug of portfolio. So the URL on the frontend is: domain.com/portfolio. I have a custom Taxonomy of "Categories" with a rewrite slug of ...
1
vote
2answers
90 views

Template for specific post of custom post type

I have the CPT "event". I have created single-event.php. I want one particular event to use a different template than single-event. I read elsewhere that this could be done by creating a ...
0
votes
0answers
26 views

get_file_data to read data for Custom Template File?

I have a plugin in which I'm trying to allow users to create their own variants of the styles, and upload them as custom "templates". Essentially these templates are php files with some HTML in them. ...
0
votes
0answers
52 views

What is the right way to replace a post type's template?

Recently I authored a plugin called Ultimate Post Types and now I have a conflict with the "Virtue" theme from WordPress.org My plugin is useful for quickly creating post types through the admin. ...
0
votes
1answer
22 views

How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?

Sorry if the title was confusing, I'm having a bit of trouble explaining here. I'm working on a theme for my site, and I'm using a slightly modified version of a custom comments template found here. ...
0
votes
3answers
105 views

Use one template only for custom post type archives?

I'm currently using archive.php as a generic listing for categories, tags, authors, etc. However, my custom post types have a very customized archive page that's completely different from archive.php. ...
0
votes
3answers
42 views

How to get all author posts outside of author templates

Currently, I'm trying to display all posts from an author(e.x admin) in a custom page with name that is completely different than these template file listed here. So inside this page, I'm using WP ...
0
votes
0answers
16 views

Can you create your own widgets and use them for editable areas of client content?

I'm relatively new to WordPress. As a content management system I chose WordPress so that I could design a website for a friend in a way that would be easy for them to use when I had handed it over. ...
0
votes
0answers
24 views

Using shortcodes that wrap around code

I'm using a membership plug in that requires me to wrap protected pages in a short code [private]content[/private] I want to use this code in my template so my client doesn't have to manually insert ...
0
votes
0answers
20 views

issues with templates

I'm working on a wordpress theme and I'm having issues with the page templates. I'm trying to do the following. I have a static front page, one custom post type and single "pages" that are ...
1
vote
0answers
21 views

Page template no longer exists - metaboxes won't save

Ok, this is a weird one. I first experienced this on an older theme that I developed - I assumed I had some buggy code in there somewhere, but couldn't figure it out even with the help of another ...
-3
votes
2answers
50 views

Template library for WordPress [closed]

I don't like to mix html/php/css code... but in some way WordPress forces me to do this bad thing. Is it possible, or is it a good idea to use something like Smarty or PHPTAL in WordPress ...
0
votes
1answer
52 views

Allow the access over wp-login.php

I created a maintenace template, and redirected to the folder where it is located via the functions.php file inside the theme folder; this is the code: function maintenance_redirect(){ if( ...
0
votes
1answer
49 views

I need to develop a one-page design

I know how to add the scrolling effect, I just needed help that how should I code the onePage.php template by which I can handle different themes for the divs i.e. ABOUT, EVENTS ... each div has a ...
2
votes
3answers
96 views

Why aren't my posts showing?

I'm creating a theme for my portfolio site. After a some time of trial and error research and almostss, I'm stuck. It's going to be very minimal site in content, therefore I decided to create a one ...
0
votes
1answer
82 views

How to create tag.php

How do I create a tag.php template that will work for every post that contain tags? I created few Tags like = Food, Drink and Fruit post 1 have Food and Drink tags post 2 have Food and Fruit ...
0
votes
1answer
45 views

Creating a archive for taxonomy terms, not the term results

So I am attempting to build the first page in my navigation hierarchy to choose product categories. I have a custom taxonomy called collections. I would like to create a page that loops through all ...
1
vote
2answers
76 views

Ways to have multiple front-page.php templates that can be swapped out?

I essentially want to create several different front-page.php templates with different loops and layouts and then present an option in the admin panel to select one template on one day and a different ...
3
votes
1answer
192 views

Templates for Custom Post Types and Custom Taxonomies

I am working on a custom theme for a network of sites that are deployed under a WordPress MultiSite installation. Within these theme I create 4 custom post types that have two taxonomies added to all ...
1
vote
2answers
51 views

Where can I access my custom page template?

I understand that to create a new page template, all I have to do is create my custom template (in this case, page-custom.php) file, and save it in wp-content/themes/mytheme/. However, where can I ...