{"id":37329,"date":"2015-05-24T21:38:53","date_gmt":"2015-05-24T21:38:53","guid":{"rendered":"https:\/\/es.wordpress.org\/support\/topic\/aplicar-css-a-una-llamada-meta\/"},"modified":"2016-08-06T00:40:43","modified_gmt":"2016-08-06T00:40:43","slug":"aplicar-css-a-una-llamada-meta","status":"closed","type":"topic","link":"https:\/\/es.wordpress.org\/support\/topic\/aplicar-css-a-una-llamada-meta\/","title":{"rendered":"Aplicar css a una llamada meta"},"content":{"rendered":"<p>Hola,<\/p>\n<p>A ver si me pod\u00e9is echar un cable, ya que he mirado por varios sitios y no he dado con la soluci\u00f3n.<\/p>\n<p>Necesito mostrar un campo personalizado en la plantilla \u00absingle.php\u00bb. Hasta aqu\u00ed, lo he logrado, el problema viene que no me aplica el estilo css que deber\u00eda.<\/p>\n<pre><code>\/\/ Get theme Options\n$max_slider_posts = cs_getoption(&#039;theme_slidermax&#039;);\n\nget_header(); ?&gt;\n\n\t&lt;div id=&quot;main&quot; class=&quot;containerblock&quot;&gt;\n\n\t\t&lt;div id=&quot;content_full&quot;&gt;\n\t\t\t&lt;?php if (have_posts()) : $postcount = 0;\n\t\t\t\t\twhile (have_posts()) : the_post(); ?&gt;\n\n\t\t\t\t\t\t&lt;div &lt;?php post_class(&#039;singlepost&#039;); ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;\n\t\t    \t\t\t\t&lt;?php the_category(); ?&gt;&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n\n\t\t    \t\t\t\t&lt;h2 class=&quot;post_title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;\/h2&gt;\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t&lt;div class=\u201ctit\u201d&gt;&lt;?php echo get_post_meta($post-&gt;ID,&#039;TITULAR&#039;,true); ?&gt;&lt;\/div&gt;\n\n\t\t\t\t\t\t&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n\n\t\t\t\t\t\t&lt;div class=&quot;date&quot;&gt;\n\t\t    \t\t\t\t\tPublicada el &lt;?php the_time(&#039;l j, F Y&#039;); ?&gt;\n\t\t\t    \t\t\t&lt;\/div&gt;\n\n\t\t\t\t\t\t&lt;div class=&quot;entry&quot;&gt;\n\t\t\t\t\t\t\t&lt;?php the_content(); ?&gt;\n\t\t\t\t\t\t\t&lt;\/br&gt;\n\t\t\t\t\t\t\t&lt;\/br&gt;\n                            &lt;?php wp_pagenavi(); ?&gt;\n\t\t\t\t\t\t\t&lt;center&gt;&lt;?php wp_pagenavi( array( &#039;type&#039; =&gt; &#039;multipart&#039; ) ); ?&gt;&lt;\/center&gt;\n\t\t\t\t\t\t\t&lt;\/br&gt;\n\t\t\t\t\t\t\t&lt;\/br&gt;\n\t\t\t    \t\t\t&lt;\/div&gt;\n&lt;p&gt;&lt;\/p&gt;\n&lt;?php st_the_tags(); ?&gt;\n&lt;img class=&quot;linfin&quot; src=&quot;http:\/\/www.primeratoma.com.es\/wp-content\/uploads\/2014\/07\/linea_cabecera.jpg&quot; alt=&quot;&quot; width=&quot;918&quot; height=&quot;7&quot; \/&gt;\n&lt;p&gt;&lt;\/p&gt;\n\t\t\t\t\t\t&lt;?php if( function_exists (&#039;ADDTOANY_SHARE_SAVE_KIT&#039;) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?&gt;\n\n\t\t    \t\t\t\t&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n&lt;\/br&gt;\n&lt;\/br&gt;\n&lt;?php wp_related_posts()?&gt;\n\n\t\t    \t\t\t\t&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n\n\t\t    \t\t\t&lt;\/div&gt;\n\n\t\t\t\t\t&lt;?\n\n\t\t\t\t\tendwhile; \n\n\t\t\t\t\trewind_posts();\n\t\t\t\t\tif (have_posts()) : $postcount = 0;\n\t\t\t\t\t\twhile (have_posts()) : the_post();\n\n\t\t\t\t\t\tcomments_template(); \n\n\t\t\t\t\t\tendwhile;\n\t\t\t\t\tendif;\n\n\t\t\t\t\t?&gt;\n\n\t\t\t\t\t&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n\n\t\t\t&lt;?php else : ?&gt;\n\n\t\t\t\t&lt;div class=&quot;post&quot;&gt;\n\t\t    \t\t&lt;div class=&quot;entry&quot;&gt;\n\t\t\t\t\t\t&lt;h2 class=&quot;title&quot;&gt;&lt;?php echo $notfound_title; ?&gt;&lt;\/h2&gt;\n\t\t\t\t\t\t&lt;p&gt;&lt;?php echo $notfound_text ?&gt;&lt;\/p&gt;\n\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;\/div&gt;\n\n\t\t\t&lt;?php endif; ?&gt;\n\n\t\t&lt;\/div&gt;\n\n\t\t&lt;div class=&quot;clearer&quot;&gt;&lt;\/div&gt;\n\n\t&lt;\/div&gt;\n\n\t&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n<p>En concreto es la l\u00ednea:<\/p>\n<p><strong>&lt;div class=\u201ctit\u201d&gt;&lt;?php echo get_post_meta($post-&gt;ID,&#8217;TITULAR&#8217;,true); ?&gt;&lt;\/div&gt;<\/strong><\/p>\n<p>El div class que hay al principio, lo ignora y me aplica el formato normal del texto de la entrada.<\/p>\n<p>\u00bfAlguien sabe por qu\u00e9 puede ser esto?<\/p>\n<p>Muchas gracias.<\/p>\n","protected":false},"template":"","class_list":["post-37329","topic","type-topic","status-closed","hentry","topic-tag-single"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/37329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/37329\/revisions"}],"wp:attachment":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=37329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}