Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author swergroup

    (@swergroup)

    Thread Starter Giulio86

    (@giulio86)

    i read the plugin documentation but i’understand this shortcodes [showauto].
    I have to write [showauto] on the page or only in category.php?
    excuse my ignorance

    Plugin Author swergroup

    (@swergroup)

    short story: [showauto] won’t work as every other shortcode, so please don’t use it unless you have understood what’s different and where it works.

    more details:

    [showauto] is something different from the other shortcodes, it should be explained better in the documentation.

    Apart from shortcodes, this plugin offers the ability to link a page to a category, in order to show the page content as header on your theme’s category template. This let you replace the usual ‘Archive for <category>’ with a more ample fixed header.

    To make this work, you must define a page -> category relationship (hence the original plugin name: page2cat): you can do that on the “edit page” screen (look for a side box) or in the “edit category” screen.

    Finally, when you have set up this exclusive relationship you need to edit the category.php template (or whatever it ships with your chosen theme) in order to display your page/header content: here’s where [showauto] is needed (and it’s the *only* place it should work). If you search in the forum you’ll find a lot of questions about this.

    Here you should find some hints about the template modification.

    Hope it helps!

    Plugin Author swergroup

    (@swergroup)

    The online documentation now reflects this explaination. Also there’s a new micro-tutorial – with screenshots – on template file editing.

    Thread Starter Giulio86

    (@giulio86)

    I followed exactly the example but does not work (I used the same theme). The page seems not connected to the category:

    (category.php)

    get_header(); ?>

    <section id=”primary” class=”site-content”>
    <div id=”content” role=”main”>

    <?php if ( have_posts() ) : ?>
    <header class=”archive-header”>
    <h1 class=”archive-title”><?php printf( __( ‘Category Archives: %s’, ‘twentytwelve’ ), ‘<span>’ . single_cat_title( ”, false ) . ‘</span>’ ); ?></h1>

    <div class=”archive-meta”> <?php echo do_shortcode(‘[showauto]’); ?></div>

    </header><!– .archive-header –>

    where am I wrong?

    thanks for the help

    Plugin Author swergroup

    (@swergroup)

    you did not. the shortcode is INSIDE the loop, after have_posts(). you need to use it OUTSIDE, or it won’t work.

    This is the modified category.php template file for twentytwelve theme:

    https://gist.github.com/swergroup/5648630

    Thread Starter Giulio86

    (@giulio86)

    I know in effect the shortcode is out of the loop, is in the header. However i have tried to put before have_posts() but don’t work.
    I do not know what to do.
    thanks for your patience

    Plugin Author swergroup

    (@swergroup)

    Did you set up a category->page relation before?

    If you have set up it, try looking your category archive page using this category.php template file in your theme: it will show the page content as header.

    If this don’t work, you need to set up a category->page relation with the meta box in the page editing screen (as in the first image in this tutorial: the select should be set on a page instead of ‘none’).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Help me! How to use this plugin?’ is closed to new replies.