-
Author
-
January 22, 2016 at 16:50 #99988tonariParticipant
Hello,
i have an issue in my group info page.
Sorry for this title, i don’t really know how to call this problem.
I use the “info” tab on my groups page, to show it’s page.
I have a new page, like any other page, with all the info of my group.
And i use this php code to call my page.COPY CODE[PHP] // get the page data $page_id = 5127; $page_data = get_post($page_id); // need to hack WP functions a bit global $post; $old_post = $post; $post = $page_data; // Display the content in a WordPress way setup_postdata($post); [/PHP] <div class="content"> [PHP] the_content(); [/PHP] </div> [PHP] // Now we need to hack it back wp_reset_postdata(); $post = $old_post; [/PHP]
That works really nicely, but, there is one issue, if i set a background color to a container on my page, or add a css to this page, those changes will not be applied inside the “info tab”.
Do you have any idea how i can fixe that?
Thanks a lot.
Regards.January 22, 2016 at 18:38 #100019RaduModeratorHi,
Can you please provide the page url where you need to style the info tab ?
An additional image that pointing out where is the info tab will be helpful
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 22, 2016 at 19:02 #100029tonariParticipantHello Radu,
sorry my website is still in dev and hide from the web.
Here is a picture of the page i’m talking about.
This is a group.Attachments:
You must be logged in to view attached files.January 26, 2016 at 16:37 #100572AndreiModeratorHi,
Most probably your content is missing some div wrappers or containers in order to structure the content like it does in a normal page. Give it a look at your page sources and make some comparisons between the content wrappers and add them into your custom code.
Chers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 26, 2016 at 17:34 #100591tonariParticipantHello Andrei, thanks for your answer.
Indeed some content/css was missing.
I did not thought of adding the missing css in my style.css … sorryBut i still have one problem.
I have to edit this .wpb_content_element on this page, but i don’t want to change this on my other pages, so i tried to add an id to this part after my page is loaded by the php. That works, but that break my text format…
I can’t use the page id, because it’s a group and i don’t have a page number.Do you know how i can do that? Edit this class only on for this page?
Thanks.
January 26, 2016 at 17:38 #100595RaduModeratorHi @tonari,
You can style statements only to a certain page by using the unique id class like
body.page-id-1 , you should check the body classes that your page it have, just made your styles and then put the body.page-id-PAGEID before
Example : body.page-id-33 .wpb_content_element { color:red; }
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJanuary 26, 2016 at 17:48 #100600RaduModeratorYou’re welcome
Have a nice week,
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.