Jump to content
pracede

Questions about Theming and custom post type

Recommended Posts

pracede    0
pracede

Hi,

 

I found pagelines very good building web sites. But sometimes, plugins, sections and others features are not sufficient to meet some requirements. I want to display a custom post type on a special template. Here is the doc http://support.pagelines.me/docs/customization/create-a-custom-page-template/ but there is not code query post or custom post from the database.

 

1. If my custom post type are jobs. How to do to display a list of jobs of a post ? Which query to use ?

 

2. If a want to display a single job, which will be the name of template file : page.job.php ?

 

 

I have download a classified plugin from mpmudev and when i log in to my website i see that a classifieds archive and classifieds template are created. See http://paste.pagelines.com/17g . My question is where i can find this template file because there are not in my child base theme ? You can see http://paste.pagelines.com/7x7 .

 

Thanks

Share this post


Link to post
Share on other sites
Rob    547
Rob

Hi,

 

If your plugin is working within WordPress, which I presume it does, then its custom post types will be written to the postloop  PageLines Framework simply pulls the postloop and displays it on whatever template the PostLoop section is added to (see PageLines > Drag & Drop > Content Area).

 

You can create custom templates, and thus you can place the PostLoop on that template.  As our documentation on Custom Templates states, you can rename the custom page template to anything, following the conventions it describes.  See: http://support.pagelines.me/docs/customization/create-a-custom-page-template/

 

I'm not sure what name the plugin requires or what code it requires to get its specific content on the page. There may be hooks needed.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
pracede    0
pracede

Thank you for replying. I've already read the documentation about Custom Page Template. In my point of view, it's not complete. Referring to what you replies, you mean that if i want to display a custom post type listing i have just to go to Drag & Drop section and select my template and assign in content area the PostLoop section? The post loop is for post and not for custom post type ! isn't it ?

 

What about my question 2?

2. If a want to display a single job, which will be the name of template file : page.job.php ? how to do ?

 

thanks

Share this post


Link to post
Share on other sites
Rob    547
Rob

I think you misunderstood.

 

1.  A custom post type isn't a special template, it is part of the post loop.  It is not something unique in PageLines, but is a special field or set of fields in WordPress.  Thus for a custom post type to display in PageLines, two things are critical.

 

A. You need to have Content (a section) present in the Page Templates in Drag & Drop.

B. You need to have PostLoop (a section) present in the Content Area for the corresponding template.

 

2.  The link I provided was to help you create a custom page template in response to your second question. If you have a plugin to create the custom post type or query in a template, then it is in the custom page template you can apply any customized display of your custom post types.

 

Your question asked "which will be the name of template file : page.job.php".  We cannot determine what page name is needed for your purposes.  I provided you the guidance explaining that you are free to name the custom page template as desired.  How a custom post type is applied depends largely on the way the custom post type is created.  Boxes, Feature Sliders, Banners are all custom post types and each has its own template. 

 

If you're using a plugin, the plugin itself should create the essential queries and post template, or provide the code you'll need. If it doesn't the plugin may not be well-suited to your needs.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
pracede    0
pracede

I am always trying with the plugin classifieds. I'ave installed the plugin and something strange appears on the deafutl page listing all classifieds. I have on top the classfieds and juste after post containing classifieds generated by pagelines framework.  You can see the image here http://paste.pagelines.com/7xb . Why this behaviour ? What to do in this page to not display content generated by pagelines ?

 

Thanks

Share this post


Link to post
Share on other sites
James B    436
James B

Hi there, looking at the image it seems that the plugin is populating the information at the top of the page, the duplicate information seems to be coming from a post. Have you tried removing the postloop on that template? Does this leave the plugin content only?


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • flourishdesignstudio
      By flourishdesignstudio
      I am working on a multisite installation and had some questions regarding the themeing options. All the sites will have the same structure but each individual site would need a different h1 font and link color. I had originally thought that I would program/edit the parent theme to have a certain set of templates, font sizes, etc. and then that would feed to all the individual sites where I could activate the child theme and use the child theme to define the individual sites' specific link color, heading fonts, etc. So, what I was shooting for was:
      Parent theme = shared by all sites
      Child theme = specific to the minor customizations on a per site basis.
      Is this possible? Am I misunderstanding how these would actually deploy to the different sites?
    • art23130
      By art23130+
      I have uploaded a file shoing missing sections for Custom Post Type
      It is OK for categories and tags but not for a single post types. 
      This is the link. 
      https://www.geoinformation.com/geocode_library/10-10570-rsg-2016-003/
      Any idea?
      thanks 
      Binder1.pdf
    • jagipson
      By jagipson+
      Should be a simple answer but not sure why its not doing this.  I have a child theme installed on pagelines 5 that has a hook so it will write over the theme css. Strange is that when I am on the frontend the code works but in the dashboard your theme takes over my code and its no where to be found. See examples attachments
      @Andrew @Danny


    • TallTree
      By TallTree+
      Hi,
      I am trying to remove the sidebar areas from my child theme (pagelines.com) from the post pages on a site:
      https://staging4.talltreemusicfestival.com/2017/grand-analog/
      The content is all the way to the left and very small, and the two sidebar areas are taking up a lot of space.
      What I'm after is content to the left, taking up most of the space, and then a small sidebar width on the right for widgets.
      I've tried selecting 'read width content' and 'full width content' in the edit screen for the WP content section, but it doesn't change.  If I try to move the sidebars (1 or 2) to the left, it doesn't change.
      If I select the pagelines framework theme (not child), the two sidebars go away when not selecting them in the edit screen..
      Can someone please tell me what I'm doing wrong?
      Thanks in advance.
      -Matt
       
    • dbrowne02
      By dbrowne02+
      Hi, I noticed that framework and pagelines.com child theme has a number of errors when run through themecheck. The others, like material and bootstrap, don't have any errors when run through theme check. Is there a way to get it so that there are no errors on the child theme?

×