Jump to content

Archived

This topic is now archived and is closed to further replies.

jankowalski1

pagelines framework 2.0

Recommended Posts

jankowalski1

How do I create taxonomy-$taxonomy.php template for my theme?

 

Share this post


Link to post
Share on other sites
jankowalski1

those are the orginal instructions for WP ADVERT plugin, but i don t find such files as described in my pagelines theme

Custom Taxonomy Template

Similarly as in previous paragraph in your current theme directory create a file taxonomy-advert_category.php, copy to it content from taxonomy.php or archive.php and customize to your needs.

For best results WPAdverts will try to use default Page template on category pages, we need to disable this functionality to allow plugin to use the custom template. Adding the code below to your theme functions.php file will do that.

  1. add_action("init", "my_theme_wpadverts_init", 20);
  2. function my_theme_wpadverts_init() {
  3. remove_filter('template_include', 'adverts_template_include');
  4. }

 

Note in some themes the category list might not work as expected (that might be due to how the archive.php template is created), in this case in your taxonomy-advert_category.php file replace the while(have_posts()) ... endwhile; loop with following code snippet

  1. <?php
  2. global $wp_query;
  3. remove_filter("the_content", "adverts_the_content");
  4. echo shortcode_adverts_list(array(
  5. "category" => $wp_query->get_queried_object_id()
  6. ));
  7. ?>

This will make the category pages display correctly.

If you are using some other taxonomies (for example Locations in Maps and Locations add-on) then you would create the taxonomy-advert_location.php and in the code snippet above remove line "category" => $wp_query->get_queried_object_id() everything else would be the same as with default categories.

Share this post


Link to post
Share on other sites
jankowalski

any support here? i paid 150$ for this product...

Share this post


Link to post
Share on other sites
lakersalex

i'm surprised they are still selling framework....

Share this post


Link to post
Share on other sites
Simon
8 minutes ago, lakersalex said:

i'm surprised they are still selling framework....

Framework is not still for sale. DMS1 was released in 2013 and the original PageLines Framework was removed from the pricing.

Share this post


Link to post
Share on other sites

×