Comments (16)
Sorry to have let this ticket slide. I'm really confused why you would want to do this, but you should be able to do it by using the template tag <?php the_subtitle(); ?>
inside of your post loop. This plugin comes with that tag for situations like this, so all you'd need to do is run your posts through a normal Loop and subtitles would show up.
from subtitles.
Hi there. This should be possible with CSS, if your subtitles are already being displayed on your archive pages. Can you link me to one of your archive pages and I will show you how to do this with CSS? Cheers.
from subtitles.
Thank yo very much for your answer.
I know very little of CSS and soft, but try to give the information.
Subtitles are not displayed on the archive pages, but they Appear on the post pages. You can see:
http://consultalegalgratuita.com/category/consultas/
If you clik the title, you go to the post: there appears the subtitle.(Is the Question ¿? under the tittle of the post
Is not a problem for me that it doesn't appear the subtitle on the Archive page, but it seems necessary as you say.
I don´t know if you need it, but I give you the CSS of the Archive page category
Thank you very much, and sorry my english.
<?php /** Begin Query Setup **/ ?>
<?php
$page_context = $this->getContext();
$paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
$query = $wp_query->query;
if ( !is_array( $query ) ) parse_str( $query, $query );
$custom_query = new WP_Query( array_merge( $query, array( 'posts_per_page' => $gantry->get( $page_context . '-count', '5' ), 'paged' => $paged ) ) ); ?>
<?php /** End Query Setup **/ ?>
<?php if( $custom_query->have_posts() ) : ?>
<?php /** Begin Page Heading **/ ?>
<?php if( $gantry->get( $page_context . '-page-heading-enabled', '1' ) ) : ?>
<?php if( $gantry->get( $page_context . '-page-heading-text' ) != '' ) : ?>
<h1>
<?php echo $gantry->get( $page_context . '-page-heading-text' ); ?>
</h1>
<?php else : ?>
<h1>
<?php printf( _r( 'Category Archives: %s' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?>
</h1>
<?php endif; ?>
<?php endif; ?>
<?php /** End Page Heading **/ ?>
<?php /** Begin Posts **/ ?>
<?php while ($custom_query->have_posts()) : $custom_query->the_post(); ?>
<?php $this->get_content_template( 'content/content' ); ?>
<?php endwhile; ?>
<?php /** End Posts **/ ?>
<?php /** Begin Pages Navigation **/ ?>
<?php if( $gantry->get( 'pagination-enabled', '1' ) && $custom_query->max_num_pages > 1 ) gantry_pagination($custom_query); ?>
<?php /** End Pages Navigation **/ ?>
<?php else : ?>
<h1>
<?php _re("Sorry, but there aren't any posts matching your query."); ?>
</h1>
<?php endif; ?>
<?php wp_reset_query(); ?>
from subtitles.
I'm receiving a Error: 404 - Página no encontrada
on that page. Can you give me a better URL? Thank you!
from subtitles.
Oh, I´m sorry, I repeat:
Subtitles are not displayed on the archive pages, but they Appear on the post pages. You can see:
http://consultalegalgratuita.com/category/arrendamientos-alquiler/
If you clik the title, you go to the post: there appears the subtitle.(Is the Question ¿? under the tittle of the post
Thank you very much !!!
from subtitles.
@jaime666 what does your content.php
file look like that outputs the content of each post? That would help narrow down why it's showing on single posts, but not archive pages.
from subtitles.
Hi, thank you very much for your help. I dont have any experience sorry, I
ve been looking for the content.php archives at the administrator panel and I´ve found 5 files with that name, I try to send it to you, but I can´t upload the file (as pdf, docx,txt...) I don´t know if that`s what you need. I´ve seen you have a mail @devio***. Can I send you the content files?
Thank you
from subtitles.
@jaime666 The file should be in your theme folder: theme-folder/content/content.php
or possibly theme-folder/content/content-single.php
Feel free to post the code here so everyone following along can see the progress of the issue rather than doing it through email.
from subtitles.
There are 5 content.php archives: content.php, content-single.php, content-page.php, content-blog.php, and content-contactpage.php.
now, I paste the content.php and content-single.php; if U need the others, tell me.
CONTENT.PHP
getContext(); // Create a shortcut for params. $category = get_the_category(); ?> <?php /** Begin Post **/ ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php /** Begin Article Title **/ ?>
<?php if( $gantry->get( $page_context . '-post-title-enabled', '1' ) ) : ?>
<h2>
<?php if( $gantry->get( $page_context . '-post-title-link', '0' ) ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php esc_attr_e( get_the_title() ); ?>"><?php the_title(); ?></a>
<?php else : ?>
<?php the_title(); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php /** End Article Title **/ ?>
<?php /** Begin Extended Meta **/ ?>
<?php if( $gantry->get( $page_context . '-meta-author-enabled', '1' ) || $gantry->get( $page_context . '-meta-category-enabled', '0' ) || $gantry->get( $page_context . '-meta-category-parent-enabled', '0' ) || $gantry->get( $page_context . '-meta-date-enabled', '1' ) || $gantry->get( $page_context . '-meta-modified-enabled' ) || $gantry->get( $page_context . '-meta-comments-enabled', '1' ) ) : ?>
<dl class="article-info">
<?php /** Begin Parent Category **/ ?>
<?php if( $gantry->get( $page_context . '-meta-category-parent-enabled', '0' ) && !empty( $category ) && $category[0]->parent != '0' ) : ?>
<dd class="parent-category-name">
<?php
$parent_category = get_category( ( int ) $category[0]->parent );
$title = $parent_category->cat_name;
$link = get_category_link( $parent_category );
$url = '<a href="' . esc_url( $link ) . '">' . $title . '</a>';
?>
<?php if( $gantry->get( $page_context . '-meta-category-parent-prefix' ) != '' ) echo $gantry->get( $page_context . '-meta-category-parent-prefix' ); ?>
<?php if( $gantry->get( $page_context . '-meta-category-parent-link', '0' ) ) : ?>
<?php echo $url; ?>
<?php else : ?>
<?php echo $title; ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php /** End Parent Category **/ ?>
<?php /** Begin Category **/ ?>
<?php if( $gantry->get( $page_context . '-meta-category-enabled', '0' ) && !empty( $category ) ) : ?>
<dd class="category-name">
<?php
$title = $category[0]->cat_name;
$link = get_category_link( $category[0]->cat_ID );
$url = '<a href="' . esc_url( $link ) . '">' . $title . '</a>';
?>
<?php if( $gantry->get( $page_context . '-meta-category-prefix' ) != '' ) echo $gantry->get( $page_context . '-meta-category-prefix' ); ?>
<?php if( $gantry->get( $page_context . '-meta-category-link', '0' ) ) : ?>
<?php echo $url; ?>
<?php else : ?>
<?php echo $title; ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php /** End Category **/ ?>
<?php /** Begin Date & Time **/ ?>
<?php if( $gantry->get( $page_context . '-meta-date-enabled', '1' ) ) : ?>
<dd class="create"> <?php if( $gantry->get( $page_context . '-meta-date-prefix' ) != '' ) echo $gantry->get( $page_context . '-meta-date-prefix' ) . ' '; ?><?php the_time( $gantry->get( $page_context . '-meta-date-format', 'd F Y' ) ); ?></dd>
<?php endif; ?>
<?php /** End Date & Time **/ ?>
<?php /** Begin Modified Date **/ ?>
<?php if( $gantry->get( $page_context . '-meta-modified-enabled', '0' ) ) : ?>
<dd class="modified"> <?php if( $gantry->get( $page_context . '-meta-modified-prefix' ) != '' ) echo $gantry->get( $page_context . '-meta-modified-prefix' ) . ' '; ?><?php the_modified_date( $gantry->get( $page_context . '-meta-modified-format', 'd F Y' ) ); ?></dd>
<?php endif; ?>
<?php /** End Modified Date **/ ?>
<?php /** Begin Author **/ ?>
<?php if( $gantry->get( $page_context . '-meta-author-enabled', '1' ) ) : ?>
<dd class="createdby"> <?php if( $gantry->get( $page_context . '-meta-author-prefix' ) != '' ) echo $gantry->get( $page_context . '-meta-author-prefix' ) . ' '; ?><?php the_author(); ?></dd>
<?php endif; ?>
<?php /** End Author **/ ?>
<?php /** Begin Comments Count **/ ?>
<?php if( $gantry->get( $page_context . '-meta-comments-enabled', '1' ) ) : ?>
<?php if( $gantry->get( $page_context . '-meta-comments-link', '0' ) ) : ?>
<dd class="comments-count">
<a href="<?php comments_link(); ?>">
<?php comments_number( _r( '0 Comments' ), _r( '1 Comment' ), _r( '% Comments' ) ); ?>
</a>
</dd>
<?php else : ?>
<dd class="comments-count"> <?php comments_number( _r( '0 Comments' ), _r( '1 Comment' ), _r( '% Comments' ) ); ?></dd>
<?php endif; ?>
<?php endif; ?>
<?php /** End Comments Count **/ ?>
</dl>
<?php endif; ?>
<?php /** End Extended Meta **/ ?>
<?php /** Begin Featured Image **/ ?>
<?php if( function_exists( 'the_post_thumbnail' ) && has_post_thumbnail() ) : ?>
<div class="img-intro-<?php echo $gantry->get( 'thumb-position', 'left' ); ?>">
<?php the_post_thumbnail( 'gantryThumb', array( 'class' => 'rt-image ' ) ); ?>
</div>
<?php endif; ?>
<?php /** End Featured Image **/ ?>
<?php /** Begin Post Content **/ ?>
<div class="post-content">
<?php if( $gantry->get( $page_context . '-content', 'content' ) == 'excerpt' ) : ?>
<?php the_excerpt(); ?>
<?php else : ?>
<?php the_content( false ); ?>
<?php endif; ?>
</div>
<?php if( $gantry->get( $page_context . '-readmore-show', 'auto' ) == 'always' || ( $gantry->get( $page_context . '-readmore-show', 'auto' ) == 'auto' && ( preg_match( '/<!--more(.*?)?-->/', $post->post_content, $readmore_matches ) || $gantry->get( $page_context . '-content', 'content' ) == 'excerpt' ) ) ) : ?>
<p class="readmore">
<a href="<?php the_permalink(); ?>" title="<?php esc_attr_e( get_the_title() ); ?>"><?php echo ( !empty( $readmore_matches[1] ) ? trim( $readmore_matches[1] ) : $gantry->get( $page_context . '-readmore-text', 'Read more ...' ) ); ?></a>
</p>
<?php endif; ?>
<?php /** End Post Content **/ ?>
</div>
<?php /** End Post **/ ?>
<div class="item-separator"></div>
Content-SINGLE.PHP
<?php /** Begin Post **/ ?>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php /** Begin Article Title **/ ?>
<?php if( $gantry->get( 'single-title-enabled', '1' ) ) : ?>
<h2>
<?php if( $gantry->get( 'single-title-link', '0' ) ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php esc_attr_e( get_the_title() ); ?>"><?php the_title(); ?></a>
<?php else : ?>
<?php the_title(); ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php /** End Article Title **/ ?>
<?php /** Begin Extended Meta **/ ?>
<?php if( $gantry->get( 'single-meta-author-enabled', '1' ) || $gantry->get( 'single-meta-category-enabled', '0' ) || $gantry->get( 'single-meta-category-parent-enabled', '0' ) || $gantry->get( 'single-meta-date-enabled', '1' ) || $gantry->get( 'single-meta-modified-enabled', '0' ) || $gantry->get( 'single-meta-comments-enabled', '1' ) ) : ?>
<dl class="article-info">
<?php /** Begin Parent Category **/ ?>
<?php if( $gantry->get( 'single-meta-category-parent-enabled', '0' ) && !empty( $category ) && $category[0]->parent != '0' ) : ?>
<dd class="parent-category-name">
<?php
$parent_category = get_category( ( int ) $category[0]->parent );
$title = $parent_category->cat_name;
$link = get_category_link( $parent_category );
$url = '<a href="' . esc_url( $link ) . '">' . $title . '</a>';
?>
<?php if( $gantry->get( 'single-meta-category-parent-prefix' ) != '' ) echo $gantry->get( 'single-meta-category-parent-prefix' ); ?>
<?php if( $gantry->get( 'single-meta-category-parent-link', '0' ) ) : ?>
<?php echo $url; ?>
<?php else : ?>
<?php echo $title; ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php /** End Parent Category **/ ?>
<?php /** Begin Category **/ ?>
<?php if( $gantry->get( 'single-meta-category-enabled', '0' ) && !empty( $category ) ) : ?>
<dd class="category-name">
<?php
$title = $category[0]->cat_name;
$link = get_category_link( $category[0]->cat_ID );
$url = '<a href="' . esc_url( $link ) . '">' . $title . '</a>';
?>
<?php if( $gantry->get( 'single-meta-category-prefix' ) != '' ) echo $gantry->get( 'single-meta-category-prefix' ); ?>
<?php if( $gantry->get( 'single-meta-category-link', '0' ) ) : ?>
<?php echo $url; ?>
<?php else : ?>
<?php echo $title; ?>
<?php endif; ?>
</dd>
<?php endif; ?>
<?php /** End Category **/ ?>
<?php /** Begin Date & Time **/ ?>
<?php if( $gantry->get( 'single-meta-date-enabled', '1' ) ) : ?>
<dd class="create"> <?php if( $gantry->get( 'single-meta-date-prefix' ) != '' ) echo $gantry->get( 'single-meta-date-prefix' ) . ' '; ?><?php the_time( $gantry->get( 'single-meta-date-format', 'd F Y' ) ); ?></dd>
<?php endif; ?>
<?php /** End Date & Time **/ ?>
<?php /** Begin Modified Date **/ ?>
<?php if( $gantry->get( 'single-meta-modified-enabled', '1' ) ) : ?>
<dd class="modified"> <?php if( $gantry->get( 'single-meta-modified-prefix' ) != '' ) echo $gantry->get( 'single-meta-modified-prefix' ) . ' '; ?><?php the_modified_date( $gantry->get( 'single-meta-modified-format', 'd F Y' ) ); ?></dd>
<?php endif; ?>
<?php /** End Modified Date **/ ?>
<?php /** Begin Author **/ ?>
<?php if( $gantry->get( 'single-meta-author-enabled', '1' ) ) : ?>
<dd class="createdby"> <?php if( $gantry->get( 'single-meta-author-prefix' ) != '' ) echo $gantry->get( 'single-meta-author-prefix' ) . ' '; ?><?php the_author(); ?></dd>
<?php endif; ?>
<?php /** End Author **/ ?>
<?php /** Begin Comments Count **/ ?>
<?php if( $gantry->get( 'single-meta-comments-enabled', '1' ) ) : ?>
<?php if( $gantry->get( 'single-meta-comments-link', '0' ) ) : ?>
<dd class="comments-count">
<a href="<?php comments_link(); ?>">
<?php comments_number( _r( '0 Comments' ), _r( '1 Comment' ), _r( '% Comments' ) ); ?>
</a>
</dd>
<?php else : ?>
<dd class="comments-count"> <?php comments_number( _r( '0 Comments' ), _r( '1 Comment' ), _r( '% Comments' ) ); ?></dd>
<?php endif; ?>
<?php endif; ?>
<?php /** End Comments Count **/ ?>
</dl>
<?php endif; ?>
<?php /** End Extended Meta **/ ?>
<?php /** Begin Featured Image **/ ?>
<?php if( $gantry->get( 'single-featured-image', '1' ) && function_exists( 'the_post_thumbnail' ) && has_post_thumbnail() ) : ?>
<div class="img-fulltext-<?php echo $gantry->get( 'thumb-position', 'left' ); ?>">
<?php the_post_thumbnail( 'gantryThumb', array( 'class' => 'rt-image ' ) ); ?>
</div>
<?php endif; ?>
<?php /** End Featured Image **/ ?>
<?php /** Begin Post Content **/ ?>
<div class="post-content">
<?php the_content(); ?>
</div>
<?php wp_link_pages( 'before=<div class="pagination page-pagination">' . _r( 'Pages:' ) . '&after=</div>' ); ?>
<?php edit_post_link( _r( 'Edit' ), '<div class="edit-link">', '</div>' ); ?>
<?php /** Begin Tags **/ ?>
<?php if( has_tag() && $gantry->get( 'single-tags', '1' ) ) : ?>
<div class="post-tags">
<div class="rt-block">
<div class="module-surround">
<div class="module-content">
<?php
$posttags = get_the_tags();
foreach ( $posttags as $tag ) { ?>
<a href="<?php echo get_tag_link( $tag->term_id ); ?>" title="<?php esc_attr_e( $tag->name ); ?>" class="btn btn-primary btn-small"><?php echo $tag->name; ?></a>
<?php } ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php /** End Tags **/ ?>
<?php if( $gantry->get( 'single-footer', '1' ) ) : ?>
<div class="post-footer">
<small>
<?php _re('This entry was posted'); ?>
<?php /* This is commented, because it requires a little adjusting sometimes.
You'll need to download this plugin, and follow the instructions:
http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
<?php _re('on'); ?> <?php the_time('l, F jS, Y') ?> <?php _re('at'); ?> <?php the_time() ?>
<?php _re('and is filed under'); ?> <?php the_category(', ') ?>.
<?php _re('You can follow any responses to this entry through the'); ?> <?php post_comments_feed_link('RSS 2.0'); ?> <?php _re('feed'); ?>.
<?php if (('open' == $post->comment_status) && ('open' == $post->ping_status)) {
// Both Comments and Pings are open ?>
<?php _re('You can'); ?> <a href="#respond"><?php _re('leave a response'); ?></a>, <?php _re('or'); ?> <a href="<?php trackback_url(); ?>" rel="trackback"><?php _re('trackback'); ?></a> <?php _re('from your own site.'); ?>
<?php } elseif (!('open' == $post->comment_status) && ('open' == $post->ping_status)) {
// Only Pings are Open ?>
<?php _re('Responses are currently closed, but you can'); ?> <a href="<?php trackback_url(); ?> " rel="trackback"><?php _re('trackback'); ?></a> <?php _re('from your own site.'); ?>
<?php } elseif (('open' == $post->comment_status) && !('open' == $post->ping_status)) {
// Comments are open, Pings are not ?>
<?php _re('You can skip to the end and leave a response. Pinging is currently not allowed.'); ?>
<?php } elseif (!('open' == $post->comment_status) && !('open' == $post->ping_status)) {
// Neither Comments, nor Pings are open ?>
<?php _re('Both comments and pings are currently closed.'); ?>
<?php } edit_post_link(_r('Edit this entry'),'','.'); ?>
</small>
</div>
<?php endif; ?>
<?php /** End Post Content **/ ?>
<?php /** Begin Comments **/ ?>
<?php if( comments_open() && $gantry->get( 'single-comments-form-enabled', '1' ) ) : ?>
<?php echo $gantry->displayComments( true, 'standard', 'standard' ); ?>
<?php endif; ?>
<?php /** End Comments **/ ?>
</div>
<?php /** End Post **/ ?>
from subtitles.
In content.php, try changing this line:
<?php if( $gantry->get( $page_context . '-post-title-link', '0' ) ) : ?>
to this:
<?php if( $gantry->get( 'single-title-link', '0' ) ) : ?>
And see if it fixes the issue for you.
from subtitles.
from subtitles.
I must leave now, sorry, thank you, I´ll come back in 8 hours
Thanks for your help
from subtitles.
Wish I could be more help, but I'm out of ideas at the moment.
from subtitles.
Hi there again,
I´ve installed Genesis Metro, and Subtitles is now running well. It shows subtitles in the posts list and in the single post.
Now I heve a questión, begiing you can help me.
I´m importing csv that I have made from an excel file. I import the csv with the pluggin "CSV Importer"
I have the titles of the colums "post_content", "post tittle", "post_title", "_yoast_wpseo_metadesc", "post_category".......
I want to fill a column with subtitles, so and I need to know wich is the tittle of colum for the "subtitles".
Can you help me?
Thank you very much.
from subtitles.
But it´s still the original issue: It is possible to list subtitles (and linked them to the single post where they were written) in a category page or archive page??. Please, someone can help? Now that I,m working with Metro (Genesis). Thank You
from subtitles.
I´d like to have the subtitles listed in a category or archive page, ordered into (inside of) the category that I assigned to the post. Maybe I´m asking a lot of things, sorry.
from subtitles.
Related Issues (20)
- Subtitle not shared on Facebook and co. HOT 3
- wp_seo_get_bc_title is deprecated HOT 13
- Maybe don't load CSS when 'subtitle_view_supported' filter is set to false HOT 1
- Gutenberg Support HOT 7
- Confirm bbPress Compatibility
- USER question re MarsEdit HOT 2
- Astra theme and comment title HOT 1
- Subtitles in custom page not showing HOT 6
- Not Showing Any More HOT 3
- Can't see subtitle box in Gutenberg HOT 1
- the_title echos both title and subtitle
- Option to keep HTML tags in subtitle fields
- Subtitle field not displaying on Page/Post add/edit form.
- Show subtitles in post loops HOT 2
- Examples
- the_subtitle logic check HOT 2
- Subtitles on Portfolio HOT 4
- multiple subtitles HOT 1
- Feature Request: above OR below HOT 5
- Changing Font Size HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from subtitles.